SabDropDirectory is now editable on Settings/Sabnzbd

This commit is contained in:
Mark McDowall 2011-06-07 00:08:37 -07:00
parent 5bf3902d5a
commit c4163d1e0d
3 changed files with 18 additions and 0 deletions

View File

@ -105,6 +105,7 @@ namespace NzbDrone.Web.Controllers
SabPassword = _configProvider.SabPassword, SabPassword = _configProvider.SabPassword,
SabTvCategory = _configProvider.SabTvCategory, SabTvCategory = _configProvider.SabTvCategory,
SabTvPriority = _configProvider.SabTvPriority, SabTvPriority = _configProvider.SabTvPriority,
SabDropDirectory = _configProvider.SabDropDirectory
}; };
return View("Index", model); return View("Index", model);
@ -367,6 +368,7 @@ namespace NzbDrone.Web.Controllers
_configProvider.SabTvCategory = data.SabTvCategory; _configProvider.SabTvCategory = data.SabTvCategory;
_configProvider.SabUsername = data.SabUsername; _configProvider.SabUsername = data.SabUsername;
_configProvider.SabTvPriority = data.SabTvPriority; _configProvider.SabTvPriority = data.SabTvPriority;
_configProvider.SabDropDirectory = data.SabDropDirectory;
basicNotification.Title = SETTINGS_SAVED; basicNotification.Title = SETTINGS_SAVED;
_notificationProvider.Register(basicNotification); _notificationProvider.Register(basicNotification);

View File

@ -51,5 +51,10 @@ namespace NzbDrone.Web.Models
[DisplayName("SABnzbd Priority")] [DisplayName("SABnzbd Priority")]
[Description("Priority to use when sending NZBs to SABnzbd")] [Description("Priority to use when sending NZBs to SABnzbd")]
public SabnzbdPriorityType SabTvPriority { get; set; } public SabnzbdPriorityType SabTvPriority { get; set; }
[DisplayName("SABnzbd TV Directory")]
[Description("The directory where SABnzbd stores TV shows (NzbDrone will sort them for you)")]
[DisplayFormat(ConvertEmptyStringToNull = false)]
public string SabDropDirectory { get; set; }
} }
} }

View File

@ -109,6 +109,17 @@
</div> </div>
</div> </div>
<div class="config-section">
<div class="config-group">
<div class="config-title">@Html.LabelFor(m => m.SabDropDirectory)</div>
<div class="config-value">@Html.TextBoxFor(m => m.SabDropDirectory)</div>
</div>
<div class="config-group2">
<div class="config-validation">@Html.ValidationMessageFor(m => m.SabDropDirectory)</div>
<div class="config-description">@Html.DescriptionFor(m => m.SabDropDirectory)</div>
</div>
</div>
<input type="submit" id="save_button" value="Save" disabled="disabled" /> <input type="submit" id="save_button" value="Save" disabled="disabled" />
</fieldset> </fieldset>
} }