Added nzbx to UI

New: nzbx indexer added
pull/6/head
Mark McDowall 12 years ago
parent 7dd846b9e9
commit 49f6c9cffb

@ -113,7 +113,7 @@ namespace NzbDrone.Core.Providers.Indexer
public override bool EnabledByDefault public override bool EnabledByDefault
{ {
get { return true; } get { return false; }
} }
protected override string TitlePreParser(SyndicationItem item) protected override string TitlePreParser(SyndicationItem item)

Binary file not shown.

After

Width:  |  Height:  |  Size: 665 B

@ -111,6 +111,7 @@ namespace NzbDrone.Web.Controllers
NzbIndexEnabled = _indexerProvider.GetSettings(typeof(NzbIndex)).Enable, NzbIndexEnabled = _indexerProvider.GetSettings(typeof(NzbIndex)).Enable,
NzbClubEnabled = _indexerProvider.GetSettings(typeof(NzbClub)).Enable, NzbClubEnabled = _indexerProvider.GetSettings(typeof(NzbClub)).Enable,
OmgwtfnzbsEnabled = _indexerProvider.GetSettings(typeof(Omgwtfnzbs)).Enable, OmgwtfnzbsEnabled = _indexerProvider.GetSettings(typeof(Omgwtfnzbs)).Enable,
NzbxEnabled = _indexerProvider.GetSettings(typeof(Nzbx)).Enable,
RssSyncInterval = _configProvider.RssSyncInterval, RssSyncInterval = _configProvider.RssSyncInterval,
@ -404,6 +405,10 @@ namespace NzbDrone.Web.Controllers
omgwtfnzbsSettings.Enable = data.OmgwtfnzbsEnabled; omgwtfnzbsSettings.Enable = data.OmgwtfnzbsEnabled;
_indexerProvider.SaveSettings(omgwtfnzbsSettings); _indexerProvider.SaveSettings(omgwtfnzbsSettings);
var nzbxSettings = _indexerProvider.GetSettings(typeof(Nzbx));
nzbxSettings.Enable = data.NzbxEnabled;
_indexerProvider.SaveSettings(nzbxSettings);
_configProvider.NzbsrusUId = data.NzbsrusUId; _configProvider.NzbsrusUId = data.NzbsrusUId;
_configProvider.NzbsrusHash = data.NzbsrusHash; _configProvider.NzbsrusHash = data.NzbsrusHash;

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

@ -25,13 +25,16 @@
<label for="fileSharingTalkStatus">File Sharing Talk</label> <label for="fileSharingTalkStatus">File Sharing Talk</label>
@Html.CheckBox("nzbIndexStatus", @Model.NzbIndexEnabled, new { @class = "indexerStatusButton" }) @Html.CheckBox("nzbIndexStatus", @Model.NzbIndexEnabled, new { @class = "indexerStatusButton" })
<label for="nzbIndexStatus">NzbIndex</label> <label for="nzbIndexStatus">NzbIndex</label>
@Html.CheckBox("nzbClubStatus", @Model.NzbClubEnabled, new { @class = "indexerStatusButton" }) @Html.CheckBox("nzbClubStatus", @Model.NzbClubEnabled, new { @class = "indexerStatusButton" })
<label for="nzbClubStatus">Nzb Club</label> <label for="nzbClubStatus">Nzb Club</label>
@Html.CheckBox("omgwtfnzbsStatus", @Model.OmgwtfnzbsEnabled, new { @class = "indexerStatusButton" }) @Html.CheckBox("omgwtfnzbsStatus", @Model.OmgwtfnzbsEnabled, new { @class = "indexerStatusButton" })
<label for="omgwtfnzbsStatus">omgwtfnzbs</label> <label for="omgwtfnzbsStatus">omgwtfnzbs</label>
@Html.CheckBox("nzbxStatus", @Model.NzbxEnabled, new { @class = "indexerStatusButton" })
<label for="nzbxStatus">nzbx</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" }))
@ -139,6 +142,14 @@
</label> </label>
@Html.TextBoxFor(m => m.OmgwtfnzbsApiKey, new { @class = "inputClass" }) @Html.TextBoxFor(m => m.OmgwtfnzbsApiKey, new { @class = "inputClass" })
</div> </div>
<h3><a href="#">nzbx</a></h3>
<div class="indexerPanel">
<label class="labelClass">
Enable <span class="small">@Html.DescriptionFor(m => m.NzbxEnabled)</span>
</label>
@Html.CheckBoxFor(m => m.NzbxEnabled, new { @class = "inputClass checkClass enabledCheck" })
</div>
</div> </div>
<div class="indexer-global-settings"> <div class="indexer-global-settings">
@ -216,6 +227,9 @@
if (id == 'OmgwtfnzbsEnabled') if (id == 'OmgwtfnzbsEnabled')
$('#omgwtfnzbsStatus').prop('checked', checked); $('#omgwtfnzbsStatus').prop('checked', checked);
if (id == 'NzbxEnabled')
$('#nzbxStatus').prop('checked', checked);
$('.indexerStatusButton').button("refresh"); $('.indexerStatusButton').button("refresh");
reValidate(); reValidate();
@ -245,6 +259,9 @@
if (id == 'omgwtfnzbsStatus') if (id == 'omgwtfnzbsStatus')
$('#OmgwtfnzbsEnabled').prop('checked', checked); $('#OmgwtfnzbsEnabled').prop('checked', checked);
if (id == 'nzbxStatus')
$('#NzbxEnabled').prop('checked', checked);
reValidate(); reValidate();
}); });

Loading…
Cancel
Save