Added nzbx to UI

New: nzbx indexer added
This commit is contained in:
Mark McDowall 2012-12-22 11:44:47 -08:00
parent 7dd846b9e9
commit 49f6c9cffb
5 changed files with 29 additions and 3 deletions

View File

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 665 B

View File

@ -111,6 +111,7 @@ namespace NzbDrone.Web.Controllers
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 @@ namespace NzbDrone.Web.Controllers
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;

View File

@ -79,6 +79,10 @@ namespace NzbDrone.Web.Models
[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")]

View File

@ -32,6 +32,9 @@
@Html.CheckBox("omgwtfnzbsStatus", @Model.OmgwtfnzbsEnabled, new { @class = "indexerStatusButton" })
<label for="omgwtfnzbsStatus">omgwtfnzbs</label>
@Html.CheckBox("nzbxStatus", @Model.NzbxEnabled, new { @class = "indexerStatusButton" })
<label for="nzbxStatus">nzbx</label>
</div>
<div id="stylized">
@using (Html.BeginForm("SaveIndexers", "Settings", FormMethod.Post, new { id = "IndexersForm", name = "IndexersForm", @class = "settingsForm" }))
@ -139,6 +142,14 @@
</label>
@Html.TextBoxFor(m => m.OmgwtfnzbsApiKey, new { @class = "inputClass" })
</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 class="indexer-global-settings">
@ -217,6 +228,9 @@
if (id == 'OmgwtfnzbsEnabled')
$('#omgwtfnzbsStatus').prop('checked', checked);
if (id == 'NzbxEnabled')
$('#nzbxStatus').prop('checked', checked);
$('.indexerStatusButton').button("refresh");
reValidate();
});
@ -246,6 +260,9 @@
if (id == 'omgwtfnzbsStatus')
$('#OmgwtfnzbsEnabled').prop('checked', checked);
if (id == 'nzbxStatus')
$('#NzbxEnabled').prop('checked', checked);
reValidate();
});