NzbIndex and NzbClub added to the UI.

pull/4/head
Mark McDowall 13 years ago
parent c24cb16127
commit 5ed53008c6

Binary file not shown.

After

Width:  |  Height:  |  Size: 603 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 260 B

@ -83,6 +83,8 @@ namespace NzbDrone.Web.Controllers
NewznabEnabled = _indexerProvider.GetSettings(typeof(Newznab)).Enable, NewznabEnabled = _indexerProvider.GetSettings(typeof(Newznab)).Enable,
WomblesEnabled = _indexerProvider.GetSettings(typeof(Wombles)).Enable, WomblesEnabled = _indexerProvider.GetSettings(typeof(Wombles)).Enable,
FileSharingTalkEnabled = _indexerProvider.GetSettings(typeof(FileSharingTalk)).Enable, FileSharingTalkEnabled = _indexerProvider.GetSettings(typeof(FileSharingTalk)).Enable,
NzbIndexEnabled = _indexerProvider.GetSettings(typeof(NzbIndex)).Enable,
NzbClubEnabled = _indexerProvider.GetSettings(typeof(NzbClub)).Enable,
NewznabDefinitions = _newznabProvider.All(), NewznabDefinitions = _newznabProvider.All(),
}); });
@ -376,6 +378,14 @@ namespace NzbDrone.Web.Controllers
fileSharingTalkSettings.Enable = data.FileSharingTalkEnabled; fileSharingTalkSettings.Enable = data.FileSharingTalkEnabled;
_indexerProvider.SaveSettings(fileSharingTalkSettings); _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.NzbsOrgUId = data.NzbsOrgUId;
_configProvider.NzbsOrgHash = data.NzbsOrgHash; _configProvider.NzbsOrgHash = data.NzbsOrgHash;

@ -107,6 +107,14 @@ namespace NzbDrone.Web.Models
[Description("Enable downloading episodes from File Sharing Talk")] [Description("Enable downloading episodes from File Sharing Talk")]
public bool FileSharingTalkEnabled { get; set; } 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")] [Required(ErrorMessage = "Please enter a valid number of days")]
[DataType(DataType.Text)] [DataType(DataType.Text)]
[DisplayName("Retention")] [DisplayName("Retention")]

@ -147,12 +147,17 @@
<Content Include="Content\DataTables-1.9.0\media\images\sort_both.png" /> <Content Include="Content\DataTables-1.9.0\media\images\sort_both.png" />
<Content Include="Content\DataTables-1.9.0\media\images\sort_desc.png" /> <Content Include="Content\DataTables-1.9.0\media\images\sort_desc.png" />
<Content Include="Content\DataTables-1.9.0\media\images\sort_desc_disabled.png" /> <Content Include="Content\DataTables-1.9.0\media\images\sort_desc_disabled.png" />
<Content Include="Content\Images\AirsToday.png" />
<Content Include="Content\Images\background.jpg" /> <Content Include="Content\Images\background.jpg" />
<Content Include="Content\Images\blue.png" /> <Content Include="Content\Images\blue.png" />
<Content Include="Content\Images\Gear.png" /> <Content Include="Content\Images\Gear.png" />
<Content Include="Content\Images\green.png" /> <Content Include="Content\Images\green.png" />
<Content Include="Content\Images\Indexers\FileSharingTalk.png" />
<Content Include="Content\Images\Indexers\Newznab.png" /> <Content Include="Content\Images\Indexers\Newznab.png" />
<Content Include="Content\Images\Indexers\NzbClub.png" />
<Content Include="Content\Images\Indexers\NzbIndex.png" />
<Content Include="Content\Images\Indexers\Nzbs.org.png" /> <Content Include="Content\Images\Indexers\Nzbs.org.png" />
<Content Include="Content\Images\Indexers\WomblesIndex.png" />
<Content Include="Content\Images\logo.png" /> <Content Include="Content\Images\logo.png" />
<Content Include="Content\Images\pause.png" /> <Content Include="Content\Images\pause.png" />
<Content Include="Content\Images\play.png" /> <Content Include="Content\Images\play.png" />

@ -30,6 +30,12 @@
@Html.CheckBox("fileSharingTalkStatus", @Model.FileSharingTalkEnabled, new { @class = "indexerStatusButton" }) @Html.CheckBox("fileSharingTalkStatus", @Model.FileSharingTalkEnabled, new { @class = "indexerStatusButton" })
<label for="fileSharingTalkStatus">File Sharing Talk</label> <label for="fileSharingTalkStatus">File Sharing Talk</label>
@Html.CheckBox("nzbIndexStatus", @Model.NzbIndexEnabled, new { @class = "indexerStatusButton" })
<label for="nzbIndexStatus">NzbIndex</label>
@Html.CheckBox("nzbClubStatus", @Model.NzbClubEnabled, new { @class = "indexerStatusButton" })
<label for="nzbClubStatus">Nzb Club</label>
</div> </div>
<div id="stylized"> <div id="stylized">
@using (Html.BeginForm("SaveIndexers", "Settings", FormMethod.Post, new { id = "IndexersForm", name = "IndexersForm", @class = "settingsForm" })) @using (Html.BeginForm("SaveIndexers", "Settings", FormMethod.Post, new { id = "IndexersForm", name = "IndexersForm", @class = "settingsForm" }))
@ -157,6 +163,22 @@
</label> </label>
@Html.TextBoxFor(m => m.FileSharingTalkSecret, new { @class = "inputClass" }) @Html.TextBoxFor(m => m.FileSharingTalkSecret, new { @class = "inputClass" })
</div> </div>
<h3><a href="#">NzbIndex</a></h3>
<div class="indexerPanel">
<label class="labelClass">
Enable <span class="small">@Html.DescriptionFor(m => m.NzbIndexEnabled)</span>
</label>
@Html.CheckBoxFor(m => m.NzbIndexEnabled, new { @class = "inputClass checkClass enabledCheck" })
</div>
<h3><a href="#">NzbClub</a></h3>
<div class="indexerPanel">
<label class="labelClass">
Enable <span class="small">@Html.DescriptionFor(m => m.NzbClubEnabled)</span>
</label>
@Html.CheckBoxFor(m => m.NzbClubEnabled, new { @class = "inputClass checkClass enabledCheck" })
</div>
</div> </div>
<div class="retentionContainer"> <div class="retentionContainer">
@ -226,6 +248,12 @@
if (id == 'FileSharingTalkEnabled') if (id == 'FileSharingTalkEnabled')
$('#fileSharingTalkStatus').prop('checked', checked); $('#fileSharingTalkStatus').prop('checked', checked);
if (id == 'NzbIndexEnabled')
$('#nzbIndexStatus').prop('checked', checked);
if (id == 'NzbClubEnabled')
$('#nzbClubStatus').prop('checked', checked);
$('.indexerStatusButton').button("refresh"); $('.indexerStatusButton').button("refresh");
reValidate(); reValidate();
@ -255,6 +283,12 @@
if (id == 'fileSharingTalkStatus') if (id == 'fileSharingTalkStatus')
$('#FileSharingTalkEnabled').prop('checked', checked); $('#FileSharingTalkEnabled').prop('checked', checked);
if (id == 'nzbIndexStatus')
$('#NzbIndexEnabled').prop('checked', checked);
if (id == 'nzbClubStatus')
$('#NzbClubEnabled').prop('checked', checked);
reValidate(); reValidate();
}); });

Loading…
Cancel
Save