From cd26b8f7288418bca3496f216a24c5ad89d3857b Mon Sep 17 00:00:00 2001 From: Mark McDowall Date: Mon, 8 Apr 2019 17:51:54 -0700 Subject: [PATCH] DownloadProtocol is an integer for release/push --- src/NzbDrone.Api/Indexers/ReleasePushModule.cs | 2 +- src/NzbDrone.Integration.Test/ApiTests/ReleasePushFixture.cs | 4 ++-- src/Sonarr.Api.V3/Indexers/ReleasePushModule.cs | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/NzbDrone.Api/Indexers/ReleasePushModule.cs b/src/NzbDrone.Api/Indexers/ReleasePushModule.cs index 8afcf3b61..d2990cbbf 100644 --- a/src/NzbDrone.Api/Indexers/ReleasePushModule.cs +++ b/src/NzbDrone.Api/Indexers/ReleasePushModule.cs @@ -34,7 +34,7 @@ namespace NzbDrone.Api.Indexers PostValidator.RuleFor(s => s.Title).NotEmpty(); PostValidator.RuleFor(s => s.DownloadUrl).NotEmpty(); - PostValidator.RuleFor(s => s.DownloadProtocol).NotEmpty(); + PostValidator.RuleFor(s => s.Protocol).NotEmpty(); PostValidator.RuleFor(s => s.PublishDate).NotEmpty(); } diff --git a/src/NzbDrone.Integration.Test/ApiTests/ReleasePushFixture.cs b/src/NzbDrone.Integration.Test/ApiTests/ReleasePushFixture.cs index 8f7390f0a..a4ed384c8 100644 --- a/src/NzbDrone.Integration.Test/ApiTests/ReleasePushFixture.cs +++ b/src/NzbDrone.Integration.Test/ApiTests/ReleasePushFixture.cs @@ -5,7 +5,6 @@ using System.Net; using System.Collections.Generic; using System; using System.Globalization; -using NzbDrone.Core.Indexers; namespace NzbDrone.Integration.Test.ApiTests { @@ -18,7 +17,8 @@ namespace NzbDrone.Integration.Test.ApiTests var body = new Dictionary(); body.Add("guid", "sdfsdfsdf"); body.Add("title", "The.Series.S01E01"); - body.Add("downloadProtocol", DownloadProtocol.Torrent.ToString()); + body.Add("downloadProtocol", 2); + body.Add("downloadUrl", "https://sonarr.tv/test.torrent"); body.Add("publishDate", DateTime.UtcNow.ToString("yyyy-MM-dd HH:mm:ssZ", CultureInfo.InvariantCulture)); var request = ReleasePush.BuildRequest(); diff --git a/src/Sonarr.Api.V3/Indexers/ReleasePushModule.cs b/src/Sonarr.Api.V3/Indexers/ReleasePushModule.cs index 912831053..f64e2b055 100644 --- a/src/Sonarr.Api.V3/Indexers/ReleasePushModule.cs +++ b/src/Sonarr.Api.V3/Indexers/ReleasePushModule.cs @@ -33,7 +33,7 @@ namespace Sonarr.Api.V3.Indexers PostValidator.RuleFor(s => s.Title).NotEmpty(); PostValidator.RuleFor(s => s.DownloadUrl).NotEmpty(); - PostValidator.RuleFor(s => s.DownloadProtocol).NotEmpty(); + PostValidator.RuleFor(s => s.Protocol).NotEmpty(); PostValidator.RuleFor(s => s.PublishDate).NotEmpty(); Post["/push"] = x => ProcessRelease(ReadResourceFromRequest());