From fd88f17eaddf705195f58d49455e77c22d0c8df5 Mon Sep 17 00:00:00 2001 From: Mark McDowall Date: Thu, 30 May 2013 08:29:43 -0700 Subject: [PATCH] DownloadClient settings cleaned up --- .../BlackholeProviderFixture.cs | 2 +- .../PneumaticProviderFixture.cs | 2 +- NzbDrone.Core/Configuration/ConfigService.cs | 4 +- NzbDrone.Core/Configuration/IConfigService.cs | 4 +- .../Download/Clients/BlackholeProvider.cs | 2 +- .../Download/Clients/PneumaticClient.cs | 2 +- .../DownloadClientTemplate.html | 68 +++++++++---------- .../DownloadClient/DownloadClientView.js | 10 +-- 8 files changed, 47 insertions(+), 47 deletions(-) diff --git a/NzbDrone.Core.Test/Download/DownloadClientTests/BlackholeProviderFixture.cs b/NzbDrone.Core.Test/Download/DownloadClientTests/BlackholeProviderFixture.cs index ce0058cec..46ccef7a2 100644 --- a/NzbDrone.Core.Test/Download/DownloadClientTests/BlackholeProviderFixture.cs +++ b/NzbDrone.Core.Test/Download/DownloadClientTests/BlackholeProviderFixture.cs @@ -22,7 +22,7 @@ namespace NzbDrone.Core.Test.Download.DownloadClientTests [SetUp] public void Setup() { - Mocker.GetMock().SetupGet(c => c.BlackholeDirectory).Returns(blackHoleFolder); + Mocker.GetMock().SetupGet(c => c.BlackholeFolder).Returns(blackHoleFolder); } diff --git a/NzbDrone.Core.Test/Download/DownloadClientTests/PneumaticProviderFixture.cs b/NzbDrone.Core.Test/Download/DownloadClientTests/PneumaticProviderFixture.cs index 280362803..6e2f01139 100644 --- a/NzbDrone.Core.Test/Download/DownloadClientTests/PneumaticProviderFixture.cs +++ b/NzbDrone.Core.Test/Download/DownloadClientTests/PneumaticProviderFixture.cs @@ -25,7 +25,7 @@ namespace NzbDrone.Core.Test.Download.DownloadClientTests { nzbPath = pneumaticFolder + title + ".nzb"; - Mocker.GetMock().SetupGet(c => c.PneumaticDirectory).Returns(pneumaticFolder); + Mocker.GetMock().SetupGet(c => c.PneumaticFolder).Returns(pneumaticFolder); Mocker.GetMock().SetupGet(c => c.DownloadedEpisodesFolder).Returns(sabDrop); } diff --git a/NzbDrone.Core/Configuration/ConfigService.cs b/NzbDrone.Core/Configuration/ConfigService.cs index 1cdc7ea9e..c9e608999 100644 --- a/NzbDrone.Core/Configuration/ConfigService.cs +++ b/NzbDrone.Core/Configuration/ConfigService.cs @@ -172,7 +172,7 @@ namespace NzbDrone.Core.Configuration set { SetValue("DownloadClient", value); } } - public string BlackholeDirectory + public string BlackholeFolder { get { return GetValue("BlackholeDirectory", String.Empty); } set { SetValue("BlackholeDirectory", value); } @@ -190,7 +190,7 @@ namespace NzbDrone.Core.Configuration set { SetValue("MetadataUseBanners", value); } } - public string PneumaticDirectory + public string PneumaticFolder { get { return GetValue("PneumaticDirectory", String.Empty); } set { SetValue("PneumaticDirectory", value); } diff --git a/NzbDrone.Core/Configuration/IConfigService.cs b/NzbDrone.Core/Configuration/IConfigService.cs index 6359f2b1e..cf2fe7c33 100644 --- a/NzbDrone.Core/Configuration/IConfigService.cs +++ b/NzbDrone.Core/Configuration/IConfigService.cs @@ -27,10 +27,10 @@ namespace NzbDrone.Core.Configuration int Retention { get; set; } Guid UGuid { get; } DownloadClientType DownloadClient { get; set; } - string BlackholeDirectory { get; set; } + string BlackholeFolder { get; set; } string ServiceRootUrl { get; } Boolean MetadataUseBanners { get; set; } - string PneumaticDirectory { get; set; } + string PneumaticFolder { get; set; } string RecycleBin { get; set; } int RssSyncInterval { get; set; } Boolean IgnoreArticlesWhenSortingSeries { get; set; } diff --git a/NzbDrone.Core/Download/Clients/BlackholeProvider.cs b/NzbDrone.Core/Download/Clients/BlackholeProvider.cs index 1ea8f5f17..9a46160b2 100644 --- a/NzbDrone.Core/Download/Clients/BlackholeProvider.cs +++ b/NzbDrone.Core/Download/Clients/BlackholeProvider.cs @@ -40,7 +40,7 @@ namespace NzbDrone.Core.Download.Clients { title = FileNameBuilder.CleanFilename(title); - var filename = Path.Combine(_configService.BlackholeDirectory, title + ".nzb"); + var filename = Path.Combine(_configService.BlackholeFolder, title + ".nzb"); if (_diskProvider.FileExists(filename)) { diff --git a/NzbDrone.Core/Download/Clients/PneumaticClient.cs b/NzbDrone.Core/Download/Clients/PneumaticClient.cs index 8d1be6c7e..f145a2b24 100644 --- a/NzbDrone.Core/Download/Clients/PneumaticClient.cs +++ b/NzbDrone.Core/Download/Clients/PneumaticClient.cs @@ -45,7 +45,7 @@ namespace NzbDrone.Core.Download.Clients title = FileNameBuilder.CleanFilename(title); //Save to the Pneumatic directory (The user will need to ensure its accessible by XBMC) - var filename = Path.Combine(_configService.PneumaticDirectory, title + ".nzb"); + var filename = Path.Combine(_configService.PneumaticFolder, title + ".nzb"); if (_diskProvider.FileExists(filename)) { diff --git a/UI/Settings/DownloadClient/DownloadClientTemplate.html b/UI/Settings/DownloadClient/DownloadClientTemplate.html index 5ce3d12a4..31eddaf2b 100644 --- a/UI/Settings/DownloadClient/DownloadClientTemplate.html +++ b/UI/Settings/DownloadClient/DownloadClientTemplate.html @@ -6,10 +6,10 @@
@@ -114,12 +114,12 @@
@@ -132,12 +132,12 @@
@@ -160,12 +160,12 @@
Blackhole
- +
- + - +
@@ -174,12 +174,12 @@
Pneumatic
- +
- + - +
@@ -258,12 +258,12 @@
@@ -276,12 +276,12 @@
diff --git a/UI/Settings/DownloadClient/DownloadClientView.js b/UI/Settings/DownloadClient/DownloadClientView.js index 9f31d48d4..4feec45bf 100644 --- a/UI/Settings/DownloadClient/DownloadClientView.js +++ b/UI/Settings/DownloadClient/DownloadClientView.js @@ -39,32 +39,32 @@ define([ refreshUIVisibility: function (clientId) { if (!clientId) { - clientId = "0"; + clientId = "sabnzbd"; } switch (clientId.toString()) { - case "0": + case "sabnzbd": this.ui.sabConfig.show(); this.ui.blackholeConfig.hide(); this.ui.pneumaticConfig.hide(); this.ui.nzbGetConfig.hide(); break; - case "1": + case "blackhole": this.ui.sabConfig.hide(); this.ui.blackholeConfig.show(); this.ui.pneumaticConfig.hide(); this.ui.nzbGetConfig.hide(); break; - case "2": + case "pneumatic": this.ui.sabConfig.hide(); this.ui.blackholeConfig.hide(); this.ui.pneumaticConfig.show(); this.ui.nzbGetConfig.hide(); break; - case "3": + case "nzbget": this.ui.sabConfig.hide(); this.ui.blackholeConfig.hide(); this.ui.pneumaticConfig.hide();