From 70fd11231d1b7b60348e2b25d0e19d1fb2e0dbbb Mon Sep 17 00:00:00 2001 From: markus101 Date: Sun, 6 Mar 2011 14:27:52 -0800 Subject: [PATCH] Post Processor Done. Will send from SAB to NzbDrone. Changed SabCategory to SabTvCategory (Support for movies later?) --- NzbDrone.Core.Test/SabControllerTest.cs | 4 +- NzbDrone.Core/Providers/SabProvider.cs | 2 +- .../NzbDrone.PostProcessor.csproj | 7 +- NzbDrone.PostProcessor/PostProcessor.xml | 6 ++ NzbDrone.PostProcessor/Program.cs | 71 +++++++++++++++++++ NzbDrone.Web/Controllers/ApiController.cs | 24 +++++-- .../Controllers/SettingsController.cs | 24 +++---- NzbDrone.Web/Models/DownloadSettingsModel.cs | 4 +- NzbDrone.Web/Views/Settings/Downloads.ascx | 8 +-- 9 files changed, 124 insertions(+), 26 deletions(-) create mode 100644 NzbDrone.PostProcessor/PostProcessor.xml diff --git a/NzbDrone.Core.Test/SabControllerTest.cs b/NzbDrone.Core.Test/SabControllerTest.cs index bb88eaa8b..65a908ead 100644 --- a/NzbDrone.Core.Test/SabControllerTest.cs +++ b/NzbDrone.Core.Test/SabControllerTest.cs @@ -34,7 +34,7 @@ namespace NzbDrone.Core.Test config.Setup(c => c.GetValue("SabUsername", String.Empty, false)).Returns(username); config.Setup(c => c.GetValue("SabPassword", String.Empty, false)).Returns(password); config.Setup(c => c.GetValue("SabPriority", String.Empty, false)).Returns(priority); - config.Setup(c => c.GetValue("SabCategory", String.Empty, false)).Returns(category); + config.Setup(c => c.GetValue("SabTvCategory", String.Empty, false)).Returns(category); var http = new Mock(); http.Setup(s => s.DownloadString("http://192.168.5.55:2222/api?mode=addurl&name=http://www.nzbclub.com/nzb_download.aspx?mid=1950232&priority=0&cat=tv&nzbname=This+is+an+Nzb&apikey=5c770e3197e4fe763423ee7c392c25d1&ma_username=admin&ma_password=pass")).Returns("ok"); @@ -67,7 +67,7 @@ namespace NzbDrone.Core.Test config.Setup(c => c.GetValue("SabUsername", String.Empty, false)).Returns(username); config.Setup(c => c.GetValue("SabPassword", String.Empty, false)).Returns(password); config.Setup(c => c.GetValue("SabPriority", String.Empty, false)).Returns(priority); - config.Setup(c => c.GetValue("SabCategory", String.Empty, false)).Returns(category); + config.Setup(c => c.GetValue("SabTvCategory", String.Empty, false)).Returns(category); var http = new Mock(); http.Setup(s => s.DownloadString("http://192.168.5.55:2222/api?mode=addurl&name=http://www.nzbclub.com/nzb_download.aspx?mid=1950232&priority=0&cat=tv&nzbname=This+is+an+Nzb&apikey=5c770e3197e4fe763423ee7c392c25d1&ma_username=admin&ma_password=pass")).Returns("error"); diff --git a/NzbDrone.Core/Providers/SabProvider.cs b/NzbDrone.Core/Providers/SabProvider.cs index c3df84cd6..08ec288e1 100644 --- a/NzbDrone.Core/Providers/SabProvider.cs +++ b/NzbDrone.Core/Providers/SabProvider.cs @@ -24,7 +24,7 @@ namespace NzbDrone.Core.Providers public bool AddByUrl(string url, string title) { const string mode = "addurl"; - //string cat = _config.GetValue("SabCategory", String.Empty, true); + //string cat = _config.GetValue("SabTvCategory", String.Empty, true); string cat = "tv"; string priority = _config.GetValue("SabPriority", String.Empty, false); string name = url.Replace("&", "%26"); diff --git a/NzbDrone.PostProcessor/NzbDrone.PostProcessor.csproj b/NzbDrone.PostProcessor/NzbDrone.PostProcessor.csproj index c2dd7425d..6fd62ee74 100644 --- a/NzbDrone.PostProcessor/NzbDrone.PostProcessor.csproj +++ b/NzbDrone.PostProcessor/NzbDrone.PostProcessor.csproj @@ -10,8 +10,9 @@ Properties NzbDrone.PostProcessor NzbDrone.PostProcessor - v2.0 + v4.0 512 + x86 @@ -36,11 +37,15 @@ + + + +