mirror of https://github.com/Sonarr/Sonarr
parent
b0fcacba9c
commit
d3282170f5
|
@ -101,12 +101,16 @@ namespace NzbDrone.Web.Controllers
|
||||||
FileSharingTalkUid = _configProvider.FileSharingTalkUid,
|
FileSharingTalkUid = _configProvider.FileSharingTalkUid,
|
||||||
FileSharingTalkSecret = _configProvider.FileSharingTalkSecret,
|
FileSharingTalkSecret = _configProvider.FileSharingTalkSecret,
|
||||||
|
|
||||||
|
OmgwtfnzbsUsername = _configProvider.OmgwtfnzbsUsername,
|
||||||
|
OmgwtfnzbsApiKey = _configProvider.OmgwtfnzbsApiKey,
|
||||||
|
|
||||||
NzbsRUsEnabled = _indexerProvider.GetSettings(typeof(NzbsRUs)).Enable,
|
NzbsRUsEnabled = _indexerProvider.GetSettings(typeof(NzbsRUs)).Enable,
|
||||||
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,
|
NzbIndexEnabled = _indexerProvider.GetSettings(typeof(NzbIndex)).Enable,
|
||||||
NzbClubEnabled = _indexerProvider.GetSettings(typeof(NzbClub)).Enable,
|
NzbClubEnabled = _indexerProvider.GetSettings(typeof(NzbClub)).Enable,
|
||||||
|
OmgwtfnzbsEnabled = _indexerProvider.GetSettings(typeof(Omgwtfnzbs)).Enable,
|
||||||
|
|
||||||
RssSyncInterval = _configProvider.RssSyncInterval,
|
RssSyncInterval = _configProvider.RssSyncInterval,
|
||||||
|
|
||||||
|
@ -395,12 +399,19 @@ namespace NzbDrone.Web.Controllers
|
||||||
nzbClubSettings.Enable = data.NzbClubEnabled;
|
nzbClubSettings.Enable = data.NzbClubEnabled;
|
||||||
_indexerProvider.SaveSettings(nzbClubSettings);
|
_indexerProvider.SaveSettings(nzbClubSettings);
|
||||||
|
|
||||||
|
var omgwtfnzbsSettings = _indexerProvider.GetSettings(typeof(Omgwtfnzbs));
|
||||||
|
omgwtfnzbsSettings.Enable = data.OmgwtfnzbsEnabled;
|
||||||
|
_indexerProvider.SaveSettings(omgwtfnzbsSettings);
|
||||||
|
|
||||||
_configProvider.NzbsrusUId = data.NzbsrusUId;
|
_configProvider.NzbsrusUId = data.NzbsrusUId;
|
||||||
_configProvider.NzbsrusHash = data.NzbsrusHash;
|
_configProvider.NzbsrusHash = data.NzbsrusHash;
|
||||||
|
|
||||||
_configProvider.FileSharingTalkUid = data.FileSharingTalkUid;
|
_configProvider.FileSharingTalkUid = data.FileSharingTalkUid;
|
||||||
_configProvider.FileSharingTalkSecret = data.FileSharingTalkSecret;
|
_configProvider.FileSharingTalkSecret = data.FileSharingTalkSecret;
|
||||||
|
|
||||||
|
_configProvider.OmgwtfnzbsUsername = data.OmgwtfnzbsUsername;
|
||||||
|
_configProvider.OmgwtfnzbsApiKey = data.OmgwtfnzbsApiKey;
|
||||||
|
|
||||||
//Save the interval to config and immediately apply it the the job (to avoid a restart)
|
//Save the interval to config and immediately apply it the the job (to avoid a restart)
|
||||||
_configProvider.RssSyncInterval = data.RssSyncInterval;
|
_configProvider.RssSyncInterval = data.RssSyncInterval;
|
||||||
|
|
||||||
|
|
|
@ -37,6 +37,20 @@ namespace NzbDrone.Web.Models
|
||||||
[RequiredIf("FileSharingTalkEnabled", true, ErrorMessage = "Password Secret Required when File Sharing Talk is enabled")]
|
[RequiredIf("FileSharingTalkEnabled", true, ErrorMessage = "Password Secret Required when File Sharing Talk is enabled")]
|
||||||
public String FileSharingTalkSecret { get; set; }
|
public String FileSharingTalkSecret { get; set; }
|
||||||
|
|
||||||
|
[DataType(DataType.Text)]
|
||||||
|
[DisplayName("Username")]
|
||||||
|
[Description("Username for omgwtfnzbs")]
|
||||||
|
[DisplayFormat(ConvertEmptyStringToNull = false)]
|
||||||
|
[RequiredIf("OmgwtfnzbsEnabled", true, ErrorMessage = "Username is required when omgwtfnzbs is enabled")]
|
||||||
|
public String OmgwtfnzbsUsername { get; set; }
|
||||||
|
|
||||||
|
[DataType(DataType.Text)]
|
||||||
|
[DisplayName("API Key")]
|
||||||
|
[Description("API Key for omgwtfnzbs")]
|
||||||
|
[DisplayFormat(ConvertEmptyStringToNull = false)]
|
||||||
|
[RequiredIf("OmgwtfnzbsEnabled", true, ErrorMessage = "API Key is required when omgwtfnzbs is enabled")]
|
||||||
|
public String OmgwtfnzbsApiKey { get; set; }
|
||||||
|
|
||||||
[DisplayName("NZBsRUs")]
|
[DisplayName("NZBsRUs")]
|
||||||
[Description("Enable downloading episodes from NZBsRus")]
|
[Description("Enable downloading episodes from NZBsRus")]
|
||||||
public bool NzbsRUsEnabled { get; set; }
|
public bool NzbsRUsEnabled { get; set; }
|
||||||
|
@ -61,6 +75,10 @@ namespace NzbDrone.Web.Models
|
||||||
[Description("Enable downloading episodes from NzbClub")]
|
[Description("Enable downloading episodes from NzbClub")]
|
||||||
public bool NzbClubEnabled { get; set; }
|
public bool NzbClubEnabled { get; set; }
|
||||||
|
|
||||||
|
[DisplayName("omgwtfnzbs")]
|
||||||
|
[Description("Enable downloading episodes from omgwtfnzbs")]
|
||||||
|
public bool OmgwtfnzbsEnabled { 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")]
|
||||||
|
|
|
@ -28,7 +28,10 @@
|
||||||
<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" })
|
||||||
|
<label for="omgwtfnzbsStatus">omgwtfnzbs</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" }))
|
||||||
|
@ -117,6 +120,25 @@
|
||||||
</label>
|
</label>
|
||||||
@Html.CheckBoxFor(m => m.NzbClubEnabled, new { @class = "inputClass checkClass enabledCheck" })
|
@Html.CheckBoxFor(m => m.NzbClubEnabled, new { @class = "inputClass checkClass enabledCheck" })
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<h3><a href="#">omgwtfnzbs</a></h3>
|
||||||
|
<div class="indexerPanel">
|
||||||
|
<label class="labelClass">
|
||||||
|
Enable <span class="small">@Html.DescriptionFor(m => m.OmgwtfnzbsEnabled)</span>
|
||||||
|
</label>
|
||||||
|
@Html.CheckBoxFor(m => m.OmgwtfnzbsEnabled, new { @class = "inputClass checkClass enabledCheck" })
|
||||||
|
|
||||||
|
<label class="labelClass">@Html.LabelFor(m => m.OmgwtfnzbsUsername)
|
||||||
|
<span class="small">@Html.DescriptionFor(m => m.OmgwtfnzbsUsername)</span>
|
||||||
|
<span class="small">@Html.ValidationMessageFor(m => m.OmgwtfnzbsUsername)</span>
|
||||||
|
</label>
|
||||||
|
@Html.TextBoxFor(m => m.OmgwtfnzbsUsername, new { @class = "inputClass" })
|
||||||
|
<label class="labelClass">@Html.LabelFor(m => m.OmgwtfnzbsApiKey)
|
||||||
|
<span class="small">@Html.DescriptionFor(m => m.OmgwtfnzbsApiKey)</span>
|
||||||
|
<span class="small">@Html.ValidationMessageFor(m => m.OmgwtfnzbsApiKey)</span>
|
||||||
|
</label>
|
||||||
|
@Html.TextBoxFor(m => m.OmgwtfnzbsApiKey, new { @class = "inputClass" })
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="indexer-global-settings">
|
<div class="indexer-global-settings">
|
||||||
|
@ -191,6 +213,9 @@
|
||||||
|
|
||||||
if (id == 'NzbClubEnabled')
|
if (id == 'NzbClubEnabled')
|
||||||
$('#nzbClubStatus').prop('checked', checked);
|
$('#nzbClubStatus').prop('checked', checked);
|
||||||
|
|
||||||
|
if (id == 'OmgwtfnzbsEnabled')
|
||||||
|
$('#omgwtfnzbsStatus').prop('checked', checked);
|
||||||
|
|
||||||
$('.indexerStatusButton').button("refresh");
|
$('.indexerStatusButton').button("refresh");
|
||||||
reValidate();
|
reValidate();
|
||||||
|
@ -217,6 +242,9 @@
|
||||||
|
|
||||||
if (id == 'nzbClubStatus')
|
if (id == 'nzbClubStatus')
|
||||||
$('#NzbClubEnabled').prop('checked', checked);
|
$('#NzbClubEnabled').prop('checked', checked);
|
||||||
|
|
||||||
|
if (id == 'omgwtfnzbsStatus')
|
||||||
|
$('#OmgwtfnzbsEnabled').prop('checked', checked);
|
||||||
|
|
||||||
reValidate();
|
reValidate();
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue