From 49f6c9cffb7fa39810e7f1c43242f4c4740ad9cd Mon Sep 17 00:00:00 2001 From: Mark McDowall Date: Sat, 22 Dec 2012 11:44:47 -0800 Subject: [PATCH] Added nzbx to UI New: nzbx indexer added --- NzbDrone.Core/Providers/Indexer/NzbClub.cs | 2 +- NzbDrone.Web/Content/Images/Indexers/nzbx.png | Bin 0 -> 665 bytes .../Controllers/SettingsController.cs | 5 +++++ NzbDrone.Web/Models/IndexerSettingsModel.cs | 4 ++++ NzbDrone.Web/Views/Settings/Indexers.cshtml | 21 ++++++++++++++++-- 5 files changed, 29 insertions(+), 3 deletions(-) create mode 100644 NzbDrone.Web/Content/Images/Indexers/nzbx.png diff --git a/NzbDrone.Core/Providers/Indexer/NzbClub.cs b/NzbDrone.Core/Providers/Indexer/NzbClub.cs index eaba45b66..c009bb0c2 100644 --- a/NzbDrone.Core/Providers/Indexer/NzbClub.cs +++ b/NzbDrone.Core/Providers/Indexer/NzbClub.cs @@ -113,7 +113,7 @@ protected override EpisodeParseResult CustomParser(SyndicationItem item, Episode public override bool EnabledByDefault { - get { return true; } + get { return false; } } protected override string TitlePreParser(SyndicationItem item) diff --git a/NzbDrone.Web/Content/Images/Indexers/nzbx.png b/NzbDrone.Web/Content/Images/Indexers/nzbx.png new file mode 100644 index 0000000000000000000000000000000000000000..ada2b0fcb973e05258d9363e02d89c650f2485d8 GIT binary patch literal 665 zcmV;K0%rY*P)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!vFvd!vV){sAK>D02*{fSaefwW^{L9 za%BKeVQFr3E>1;MAa*k@H7+qQF!XYv0006ANkl2MR=qPQQT zJdn6(;->L;;)BT^@X`3<`_?i#uv8e47>yG*HJQ=P0 zZ@RqZ<1gXdSlrt}UBKC499gz<3x`LA z{d#ge^Q_~r!vwN#q&n?;K)I1wNzEAPK+?$;!tuX^m$N~LF(YAgSFP7h0T3_+iW08j ztOexfCqTxU;$2+!vr*mK0andcJu1(4yPh-U-L`)cU+B6%003*ZMn`_%F{>9DOCp7b79@I*vw7 zy%Fc+@{hqIRU5gt>H9dc;^@374;ovQ<{O$i;LsbpFMZr3lw#YXAv70aZyOlNI}-}o z4`i!bl;G;Nw+4RQ67pYC2hpG~10lv(gUK5u^-u3Vz-@zJme4q)7ZYPYWm5fDRhvax zS;CPGOfS0lQF0rn?_9oEo>=B4x;fiB&b@cQ8_kqM=EKfY!(V2n#6t8K2rxH2^c9?* z3dSGq?8h{%X#iU5C{x)CbN3+Sp&h~aBQXC1^X6qr-6JKI00000NkvXXu0mjf*Ci-e literal 0 HcmV?d00001 diff --git a/NzbDrone.Web/Controllers/SettingsController.cs b/NzbDrone.Web/Controllers/SettingsController.cs index 948facf33..af79c336a 100644 --- a/NzbDrone.Web/Controllers/SettingsController.cs +++ b/NzbDrone.Web/Controllers/SettingsController.cs @@ -111,6 +111,7 @@ public ActionResult Indexers() NzbIndexEnabled = _indexerProvider.GetSettings(typeof(NzbIndex)).Enable, NzbClubEnabled = _indexerProvider.GetSettings(typeof(NzbClub)).Enable, OmgwtfnzbsEnabled = _indexerProvider.GetSettings(typeof(Omgwtfnzbs)).Enable, + NzbxEnabled = _indexerProvider.GetSettings(typeof(Nzbx)).Enable, RssSyncInterval = _configProvider.RssSyncInterval, @@ -404,6 +405,10 @@ public JsonResult SaveIndexers(IndexerSettingsModel data) omgwtfnzbsSettings.Enable = data.OmgwtfnzbsEnabled; _indexerProvider.SaveSettings(omgwtfnzbsSettings); + var nzbxSettings = _indexerProvider.GetSettings(typeof(Nzbx)); + nzbxSettings.Enable = data.NzbxEnabled; + _indexerProvider.SaveSettings(nzbxSettings); + _configProvider.NzbsrusUId = data.NzbsrusUId; _configProvider.NzbsrusHash = data.NzbsrusHash; diff --git a/NzbDrone.Web/Models/IndexerSettingsModel.cs b/NzbDrone.Web/Models/IndexerSettingsModel.cs index 60c2b09fb..2b0b06f60 100644 --- a/NzbDrone.Web/Models/IndexerSettingsModel.cs +++ b/NzbDrone.Web/Models/IndexerSettingsModel.cs @@ -79,6 +79,10 @@ public class IndexerSettingsModel [Description("Enable downloading episodes from omgwtfnzbs")] public bool OmgwtfnzbsEnabled { get; set; } + [DisplayName("nzbx")] + [Description("Enable downloading episodes from nzbx")] + public bool NzbxEnabled { get; set; } + [Required(ErrorMessage = "Please enter a valid number of days")] [DataType(DataType.Text)] [DisplayName("Retention")] diff --git a/NzbDrone.Web/Views/Settings/Indexers.cshtml b/NzbDrone.Web/Views/Settings/Indexers.cshtml index bb1aebae2..05b904e6e 100644 --- a/NzbDrone.Web/Views/Settings/Indexers.cshtml +++ b/NzbDrone.Web/Views/Settings/Indexers.cshtml @@ -25,13 +25,16 @@ @Html.CheckBox("nzbIndexStatus", @Model.NzbIndexEnabled, new { @class = "indexerStatusButton" }) - + @Html.CheckBox("nzbClubStatus", @Model.NzbClubEnabled, new { @class = "indexerStatusButton" }) @Html.CheckBox("omgwtfnzbsStatus", @Model.OmgwtfnzbsEnabled, new { @class = "indexerStatusButton" }) - + + + @Html.CheckBox("nzbxStatus", @Model.NzbxEnabled, new { @class = "indexerStatusButton" }) +
@using (Html.BeginForm("SaveIndexers", "Settings", FormMethod.Post, new { id = "IndexersForm", name = "IndexersForm", @class = "settingsForm" })) @@ -139,6 +142,14 @@ @Html.TextBoxFor(m => m.OmgwtfnzbsApiKey, new { @class = "inputClass" })
+ +

nzbx

+
+ + @Html.CheckBoxFor(m => m.NzbxEnabled, new { @class = "inputClass checkClass enabledCheck" }) +
@@ -216,6 +227,9 @@ if (id == 'OmgwtfnzbsEnabled') $('#omgwtfnzbsStatus').prop('checked', checked); + + if (id == 'NzbxEnabled') + $('#nzbxStatus').prop('checked', checked); $('.indexerStatusButton').button("refresh"); reValidate(); @@ -245,6 +259,9 @@ if (id == 'omgwtfnzbsStatus') $('#OmgwtfnzbsEnabled').prop('checked', checked); + + if (id == 'nzbxStatus') + $('#NzbxEnabled').prop('checked', checked); reValidate(); });