DownloadClient settings cleaned up

This commit is contained in:
Mark McDowall 2013-05-30 08:29:43 -07:00
parent c1bbd0bd5d
commit fd88f17ead
8 changed files with 47 additions and 47 deletions

View File

@ -22,7 +22,7 @@ namespace NzbDrone.Core.Test.Download.DownloadClientTests
[SetUp] [SetUp]
public void Setup() public void Setup()
{ {
Mocker.GetMock<IConfigService>().SetupGet(c => c.BlackholeDirectory).Returns(blackHoleFolder); Mocker.GetMock<IConfigService>().SetupGet(c => c.BlackholeFolder).Returns(blackHoleFolder);
} }

View File

@ -25,7 +25,7 @@ namespace NzbDrone.Core.Test.Download.DownloadClientTests
{ {
nzbPath = pneumaticFolder + title + ".nzb"; nzbPath = pneumaticFolder + title + ".nzb";
Mocker.GetMock<IConfigService>().SetupGet(c => c.PneumaticDirectory).Returns(pneumaticFolder); Mocker.GetMock<IConfigService>().SetupGet(c => c.PneumaticFolder).Returns(pneumaticFolder);
Mocker.GetMock<IConfigService>().SetupGet(c => c.DownloadedEpisodesFolder).Returns(sabDrop); Mocker.GetMock<IConfigService>().SetupGet(c => c.DownloadedEpisodesFolder).Returns(sabDrop);
} }

View File

@ -172,7 +172,7 @@ namespace NzbDrone.Core.Configuration
set { SetValue("DownloadClient", value); } set { SetValue("DownloadClient", value); }
} }
public string BlackholeDirectory public string BlackholeFolder
{ {
get { return GetValue("BlackholeDirectory", String.Empty); } get { return GetValue("BlackholeDirectory", String.Empty); }
set { SetValue("BlackholeDirectory", value); } set { SetValue("BlackholeDirectory", value); }
@ -190,7 +190,7 @@ namespace NzbDrone.Core.Configuration
set { SetValue("MetadataUseBanners", value); } set { SetValue("MetadataUseBanners", value); }
} }
public string PneumaticDirectory public string PneumaticFolder
{ {
get { return GetValue("PneumaticDirectory", String.Empty); } get { return GetValue("PneumaticDirectory", String.Empty); }
set { SetValue("PneumaticDirectory", value); } set { SetValue("PneumaticDirectory", value); }

View File

@ -27,10 +27,10 @@ namespace NzbDrone.Core.Configuration
int Retention { get; set; } int Retention { get; set; }
Guid UGuid { get; } Guid UGuid { get; }
DownloadClientType DownloadClient { get; set; } DownloadClientType DownloadClient { get; set; }
string BlackholeDirectory { get; set; } string BlackholeFolder { get; set; }
string ServiceRootUrl { get; } string ServiceRootUrl { get; }
Boolean MetadataUseBanners { get; set; } Boolean MetadataUseBanners { get; set; }
string PneumaticDirectory { get; set; } string PneumaticFolder { get; set; }
string RecycleBin { get; set; } string RecycleBin { get; set; }
int RssSyncInterval { get; set; } int RssSyncInterval { get; set; }
Boolean IgnoreArticlesWhenSortingSeries { get; set; } Boolean IgnoreArticlesWhenSortingSeries { get; set; }

View File

@ -40,7 +40,7 @@ namespace NzbDrone.Core.Download.Clients
{ {
title = FileNameBuilder.CleanFilename(title); title = FileNameBuilder.CleanFilename(title);
var filename = Path.Combine(_configService.BlackholeDirectory, title + ".nzb"); var filename = Path.Combine(_configService.BlackholeFolder, title + ".nzb");
if (_diskProvider.FileExists(filename)) if (_diskProvider.FileExists(filename))
{ {

View File

@ -45,7 +45,7 @@ namespace NzbDrone.Core.Download.Clients
title = FileNameBuilder.CleanFilename(title); title = FileNameBuilder.CleanFilename(title);
//Save to the Pneumatic directory (The user will need to ensure its accessible by XBMC) //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)) if (_diskProvider.FileExists(filename))
{ {

View File

@ -6,10 +6,10 @@
<div class="controls"> <div class="controls">
<select class="inputClass x-download-client" name="downloadClient"> <select class="inputClass x-download-client" name="downloadClient">
<option value="0">SABnzbd</option> <option value="sabnzbd">SABnzbd</option>
<option value="1">Blackhole</option> <option value="blackhole">Blackhole</option>
<option value="2">Pneumatic</option> <option value="pneumatic">Pneumatic</option>
<option value="3">NZBGet</option> <option value="nzbget">NZBGet</option>
</select> </select>
<span class="help-inline"> <span class="help-inline">
<i class="icon-question-sign" title="What method do you download NZBs with?"></i> <i class="icon-question-sign" title="What method do you download NZBs with?"></i>
@ -114,12 +114,12 @@
<div class="controls"> <div class="controls">
<select name="sabBacklogTvPriority"> <select name="sabBacklogTvPriority">
<option>Default</option> <option value="default">Default</option>
<option>Paused</option> <option value="paused">Paused</option>
<option>Low</option> <option value="low">Low</option>
<option>Normal</option> <option value="normal">Normal</option>
<option>High</option> <option value="high">High</option>
<option>Force</option> <option value="force">Force</option>
</select> </select>
<span class="help-inline"> <span class="help-inline">
<i class="icon-question-sign" title="Priority to use when sending episodes older than 7 days to SABnzbd"></i> <i class="icon-question-sign" title="Priority to use when sending episodes older than 7 days to SABnzbd"></i>
@ -132,12 +132,12 @@
<div class="controls"> <div class="controls">
<select name="sabRecentTvPriority"> <select name="sabRecentTvPriority">
<option>Default</option> <option value="default">Default</option>
<option>Paused</option> <option value="paused">Paused</option>
<option>Low</option> <option value="low">Low</option>
<option>Normal</option> <option value="normal">Normal</option>
<option>High</option> <option value="high">High</option>
<option>Force</option> <option value="force">Force</option>
</select> </select>
<span class="help-inline"> <span class="help-inline">
<i class="icon-question-sign" title="Priority to use when sending episodes that aired within the last 7 days to SABnzbd"></i> <i class="icon-question-sign" title="Priority to use when sending episodes that aired within the last 7 days to SABnzbd"></i>
@ -160,12 +160,12 @@
<fieldset class="x-blackhole-config"> <fieldset class="x-blackhole-config">
<legend>Blackhole</legend> <legend>Blackhole</legend>
<div class="control-group"> <div class="control-group">
<label class="control-label">Blackhole Directory</label> <label class="control-label">Blackhole Folder</label>
<div class="controls"> <div class="controls">
<input type="text" name="blackholeDirectory" class="x-path"/> <input type="text" name="blackholeFolder" class="x-path"/>
<span class="help-inline"> <span class="help-inline">
<i class="icon-question-sign" title="The directory where your download client will pickup .nzb files"></i> <i class="icon-question-sign" title="The folder where your download client will pickup .nzb files"></i>
</span> </span>
</div> </div>
</div> </div>
@ -174,12 +174,12 @@
<fieldset class="x-pneumatic-config"> <fieldset class="x-pneumatic-config">
<legend>Pneumatic</legend> <legend>Pneumatic</legend>
<div class="control-group"> <div class="control-group">
<label class="control-label">Nzb Directory</label> <label class="control-label">Nzb Folder</label>
<div class="controls"> <div class="controls">
<input type="text" name="pneumaticDirectory" class="x-path"/> <input type="text" name="pneumaticFolder" class="x-path"/>
<span class="help-inline"> <span class="help-inline">
<i class="icon-question-sign" title="Directory to save NZBs for Pneumatic<br/>must be accessible from XBMC"></i> <i class="icon-question-sign" title="Folder to save NZBs for Pneumatic<br/>must be accessible from XBMC"></i>
</span> </span>
</div> </div>
</div> </div>
@ -258,12 +258,12 @@
<div class="controls"> <div class="controls">
<select name="nzbgetBacklogTvPriority"> <select name="nzbgetBacklogTvPriority">
<option>Default</option> <option value="default">Default</option>
<option>Paused</option> <option value="pasued">Paused</option>
<option>Low</option> <option value="low">Low</option>
<option>Normal</option> <option value="normal">Normal</option>
<option>High</option> <option value="high">High</option>
<option>Force</option> <option value="force">Force</option>
</select> </select>
<span class="help-inline"> <span class="help-inline">
<i class="icon-question-sign" title="Priority to use when sending episodes older than 7 days to NZBGet"></i> <i class="icon-question-sign" title="Priority to use when sending episodes older than 7 days to NZBGet"></i>
@ -276,12 +276,12 @@
<div class="controls"> <div class="controls">
<select name="nzbgetRecentTvPriority"> <select name="nzbgetRecentTvPriority">
<option>Default</option> <option value="default">Default</option>
<option>Paused</option> <option value="pasued">Paused</option>
<option>Low</option> <option value="low">Low</option>
<option>Normal</option> <option value="normal">Normal</option>
<option>High</option> <option value="high">High</option>
<option>Force</option> <option value="force">Force</option>
</select> </select>
<span class="help-inline"> <span class="help-inline">
<i class="icon-question-sign" title="Priority to use when sending episodes that aired within the last 7 days to NZBGet"></i> <i class="icon-question-sign" title="Priority to use when sending episodes that aired within the last 7 days to NZBGet"></i>

View File

@ -39,32 +39,32 @@ define([
refreshUIVisibility: function (clientId) { refreshUIVisibility: function (clientId) {
if (!clientId) { if (!clientId) {
clientId = "0"; clientId = "sabnzbd";
} }
switch (clientId.toString()) { switch (clientId.toString()) {
case "0": case "sabnzbd":
this.ui.sabConfig.show(); this.ui.sabConfig.show();
this.ui.blackholeConfig.hide(); this.ui.blackholeConfig.hide();
this.ui.pneumaticConfig.hide(); this.ui.pneumaticConfig.hide();
this.ui.nzbGetConfig.hide(); this.ui.nzbGetConfig.hide();
break; break;
case "1": case "blackhole":
this.ui.sabConfig.hide(); this.ui.sabConfig.hide();
this.ui.blackholeConfig.show(); this.ui.blackholeConfig.show();
this.ui.pneumaticConfig.hide(); this.ui.pneumaticConfig.hide();
this.ui.nzbGetConfig.hide(); this.ui.nzbGetConfig.hide();
break; break;
case "2": case "pneumatic":
this.ui.sabConfig.hide(); this.ui.sabConfig.hide();
this.ui.blackholeConfig.hide(); this.ui.blackholeConfig.hide();
this.ui.pneumaticConfig.show(); this.ui.pneumaticConfig.show();
this.ui.nzbGetConfig.hide(); this.ui.nzbGetConfig.hide();
break; break;
case "3": case "nzbget":
this.ui.sabConfig.hide(); this.ui.sabConfig.hide();
this.ui.blackholeConfig.hide(); this.ui.blackholeConfig.hide();
this.ui.pneumaticConfig.hide(); this.ui.pneumaticConfig.hide();