diff --git a/NzbDrone.Web/Content/Images/Indexers/NzbClub.png b/NzbDrone.Web/Content/Images/Indexers/NzbClub.png new file mode 100644 index 000000000..1f68226ad Binary files /dev/null and b/NzbDrone.Web/Content/Images/Indexers/NzbClub.png differ diff --git a/NzbDrone.Web/Content/Images/Indexers/NzbIndex.png b/NzbDrone.Web/Content/Images/Indexers/NzbIndex.png new file mode 100644 index 000000000..d465fa352 Binary files /dev/null and b/NzbDrone.Web/Content/Images/Indexers/NzbIndex.png differ diff --git a/NzbDrone.Web/Controllers/SettingsController.cs b/NzbDrone.Web/Controllers/SettingsController.cs index 99bf5e183..9ef4f447d 100644 --- a/NzbDrone.Web/Controllers/SettingsController.cs +++ b/NzbDrone.Web/Controllers/SettingsController.cs @@ -83,6 +83,8 @@ namespace NzbDrone.Web.Controllers NewznabEnabled = _indexerProvider.GetSettings(typeof(Newznab)).Enable, WomblesEnabled = _indexerProvider.GetSettings(typeof(Wombles)).Enable, FileSharingTalkEnabled = _indexerProvider.GetSettings(typeof(FileSharingTalk)).Enable, + NzbIndexEnabled = _indexerProvider.GetSettings(typeof(NzbIndex)).Enable, + NzbClubEnabled = _indexerProvider.GetSettings(typeof(NzbClub)).Enable, NewznabDefinitions = _newznabProvider.All(), }); @@ -376,6 +378,14 @@ namespace NzbDrone.Web.Controllers fileSharingTalkSettings.Enable = data.FileSharingTalkEnabled; _indexerProvider.SaveSettings(fileSharingTalkSettings); + var nzbIndexSettings = _indexerProvider.GetSettings(typeof(NzbIndex)); + nzbIndexSettings.Enable = data.NzbIndexEnabled; + _indexerProvider.SaveSettings(nzbIndexSettings); + + var nzbClubSettings = _indexerProvider.GetSettings(typeof(NzbClub)); + nzbClubSettings.Enable = data.NzbClubEnabled; + _indexerProvider.SaveSettings(nzbClubSettings); + _configProvider.NzbsOrgUId = data.NzbsOrgUId; _configProvider.NzbsOrgHash = data.NzbsOrgHash; diff --git a/NzbDrone.Web/Models/IndexerSettingsModel.cs b/NzbDrone.Web/Models/IndexerSettingsModel.cs index 45e3969e4..58d734b4a 100644 --- a/NzbDrone.Web/Models/IndexerSettingsModel.cs +++ b/NzbDrone.Web/Models/IndexerSettingsModel.cs @@ -107,6 +107,14 @@ namespace NzbDrone.Web.Models [Description("Enable downloading episodes from File Sharing Talk")] public bool FileSharingTalkEnabled { get; set; } + [DisplayName("NzbIndex")] + [Description("Enable downloading episodes from NzbIndex")] + public bool NzbIndexEnabled { get; set; } + + [DisplayName("NzbClub")] + [Description("Enable downloading episodes from NzbClub")] + public bool NzbClubEnabled { get; set; } + [Required(ErrorMessage = "Please enter a valid number of days")] [DataType(DataType.Text)] [DisplayName("Retention")] diff --git a/NzbDrone.Web/NzbDrone.Web.csproj b/NzbDrone.Web/NzbDrone.Web.csproj index 2c4476078..92dac587e 100644 --- a/NzbDrone.Web/NzbDrone.Web.csproj +++ b/NzbDrone.Web/NzbDrone.Web.csproj @@ -147,12 +147,17 @@ + + + + + diff --git a/NzbDrone.Web/Views/Settings/Indexers.cshtml b/NzbDrone.Web/Views/Settings/Indexers.cshtml index 61be0559d..42a9525fb 100644 --- a/NzbDrone.Web/Views/Settings/Indexers.cshtml +++ b/NzbDrone.Web/Views/Settings/Indexers.cshtml @@ -30,6 +30,12 @@ @Html.CheckBox("fileSharingTalkStatus", @Model.FileSharingTalkEnabled, new { @class = "indexerStatusButton" }) + + @Html.CheckBox("nzbIndexStatus", @Model.NzbIndexEnabled, new { @class = "indexerStatusButton" }) + + + @Html.CheckBox("nzbClubStatus", @Model.NzbClubEnabled, new { @class = "indexerStatusButton" }) +
@using (Html.BeginForm("SaveIndexers", "Settings", FormMethod.Post, new { id = "IndexersForm", name = "IndexersForm", @class = "settingsForm" })) @@ -157,6 +163,22 @@ @Html.TextBoxFor(m => m.FileSharingTalkSecret, new { @class = "inputClass" })
+ +

NzbIndex

+
+ + @Html.CheckBoxFor(m => m.NzbIndexEnabled, new { @class = "inputClass checkClass enabledCheck" }) +
+ +

NzbClub

+
+ + @Html.CheckBoxFor(m => m.NzbClubEnabled, new { @class = "inputClass checkClass enabledCheck" }) +
@@ -226,6 +248,12 @@ if (id == 'FileSharingTalkEnabled') $('#fileSharingTalkStatus').prop('checked', checked); + + if (id == 'NzbIndexEnabled') + $('#nzbIndexStatus').prop('checked', checked); + + if (id == 'NzbClubEnabled') + $('#nzbClubStatus').prop('checked', checked); $('.indexerStatusButton').button("refresh"); reValidate(); @@ -255,6 +283,12 @@ if (id == 'fileSharingTalkStatus') $('#FileSharingTalkEnabled').prop('checked', checked); + + if (id == 'nzbIndexStatus') + $('#NzbIndexEnabled').prop('checked', checked); + + if (id == 'nzbClubStatus') + $('#NzbClubEnabled').prop('checked', checked); reValidate(); });