From c4163d1e0dc360ae53f1c21255d6147a3aefd945 Mon Sep 17 00:00:00 2001 From: Mark McDowall Date: Tue, 7 Jun 2011 00:08:37 -0700 Subject: [PATCH] SabDropDirectory is now editable on Settings/Sabnzbd --- NzbDrone.Web/Controllers/SettingsController.cs | 2 ++ NzbDrone.Web/Models/SabnzbdSettingsModel.cs | 5 +++++ NzbDrone.Web/Views/Settings/Sabnzbd.cshtml | 11 +++++++++++ 3 files changed, 18 insertions(+) diff --git a/NzbDrone.Web/Controllers/SettingsController.cs b/NzbDrone.Web/Controllers/SettingsController.cs index 1a00d24d9..cee95e93a 100644 --- a/NzbDrone.Web/Controllers/SettingsController.cs +++ b/NzbDrone.Web/Controllers/SettingsController.cs @@ -105,6 +105,7 @@ namespace NzbDrone.Web.Controllers SabPassword = _configProvider.SabPassword, SabTvCategory = _configProvider.SabTvCategory, SabTvPriority = _configProvider.SabTvPriority, + SabDropDirectory = _configProvider.SabDropDirectory }; return View("Index", model); @@ -367,6 +368,7 @@ namespace NzbDrone.Web.Controllers _configProvider.SabTvCategory = data.SabTvCategory; _configProvider.SabUsername = data.SabUsername; _configProvider.SabTvPriority = data.SabTvPriority; + _configProvider.SabDropDirectory = data.SabDropDirectory; basicNotification.Title = SETTINGS_SAVED; _notificationProvider.Register(basicNotification); diff --git a/NzbDrone.Web/Models/SabnzbdSettingsModel.cs b/NzbDrone.Web/Models/SabnzbdSettingsModel.cs index 3b022e12e..179a7b398 100644 --- a/NzbDrone.Web/Models/SabnzbdSettingsModel.cs +++ b/NzbDrone.Web/Models/SabnzbdSettingsModel.cs @@ -51,5 +51,10 @@ namespace NzbDrone.Web.Models [DisplayName("SABnzbd Priority")] [Description("Priority to use when sending NZBs to SABnzbd")] 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; } } } \ No newline at end of file diff --git a/NzbDrone.Web/Views/Settings/Sabnzbd.cshtml b/NzbDrone.Web/Views/Settings/Sabnzbd.cshtml index 11e76d7a8..7e4dcf0d7 100644 --- a/NzbDrone.Web/Views/Settings/Sabnzbd.cshtml +++ b/NzbDrone.Web/Views/Settings/Sabnzbd.cshtml @@ -109,6 +109,17 @@ +
+
+
@Html.LabelFor(m => m.SabDropDirectory)
+
@Html.TextBoxFor(m => m.SabDropDirectory)
+
+
+
@Html.ValidationMessageFor(m => m.SabDropDirectory)
+
@Html.DescriptionFor(m => m.SabDropDirectory)
+
+
+ }