1
0
mirror of https://github.com/Sonarr/Sonarr.git synced 2024-12-14 11:23:42 +02:00

NzbIndex and NzbClub added to the UI.

This commit is contained in:
Mark McDowall 2012-04-14 17:04:08 -07:00
parent c24cb16127
commit 5ed53008c6
6 changed files with 57 additions and 0 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 603 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 260 B

View File

@ -83,6 +83,8 @@ public ActionResult Indexers()
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 @@ public JsonResult SaveIndexers(IndexerSettingsModel data)
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;

View File

@ -107,6 +107,14 @@ public class IndexerSettingsModel
[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")]

View File

@ -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_desc.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\blue.png" />
<Content Include="Content\Images\Gear.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\NzbClub.png" />
<Content Include="Content\Images\Indexers\NzbIndex.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\pause.png" />
<Content Include="Content\Images\play.png" />

View File

@ -30,6 +30,12 @@
@Html.CheckBox("fileSharingTalkStatus", @Model.FileSharingTalkEnabled, new { @class = "indexerStatusButton" })
<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 id="stylized">
@using (Html.BeginForm("SaveIndexers", "Settings", FormMethod.Post, new { id = "IndexersForm", name = "IndexersForm", @class = "settingsForm" }))
@ -157,6 +163,22 @@
</label>
@Html.TextBoxFor(m => m.FileSharingTalkSecret, new { @class = "inputClass" })
</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 class="retentionContainer">
@ -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();
});