mirror of
https://github.com/lidarr/Lidarr
synced 2024-12-27 01:57:21 +00:00
Added omgwtfnzbs to UI
New: omgwtfnzbs indexer added
This commit is contained in:
parent
b0fcacba9c
commit
d3282170f5
3 changed files with 58 additions and 1 deletions
|
@ -101,12 +101,16 @@ public ActionResult Indexers()
|
|||
FileSharingTalkUid = _configProvider.FileSharingTalkUid,
|
||||
FileSharingTalkSecret = _configProvider.FileSharingTalkSecret,
|
||||
|
||||
OmgwtfnzbsUsername = _configProvider.OmgwtfnzbsUsername,
|
||||
OmgwtfnzbsApiKey = _configProvider.OmgwtfnzbsApiKey,
|
||||
|
||||
NzbsRUsEnabled = _indexerProvider.GetSettings(typeof(NzbsRUs)).Enable,
|
||||
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,
|
||||
OmgwtfnzbsEnabled = _indexerProvider.GetSettings(typeof(Omgwtfnzbs)).Enable,
|
||||
|
||||
RssSyncInterval = _configProvider.RssSyncInterval,
|
||||
|
||||
|
@ -395,12 +399,19 @@ public JsonResult SaveIndexers(IndexerSettingsModel data)
|
|||
nzbClubSettings.Enable = data.NzbClubEnabled;
|
||||
_indexerProvider.SaveSettings(nzbClubSettings);
|
||||
|
||||
var omgwtfnzbsSettings = _indexerProvider.GetSettings(typeof(Omgwtfnzbs));
|
||||
omgwtfnzbsSettings.Enable = data.OmgwtfnzbsEnabled;
|
||||
_indexerProvider.SaveSettings(omgwtfnzbsSettings);
|
||||
|
||||
_configProvider.NzbsrusUId = data.NzbsrusUId;
|
||||
_configProvider.NzbsrusHash = data.NzbsrusHash;
|
||||
|
||||
_configProvider.FileSharingTalkUid = data.FileSharingTalkUid;
|
||||
_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)
|
||||
_configProvider.RssSyncInterval = data.RssSyncInterval;
|
||||
|
||||
|
|
|
@ -37,6 +37,20 @@ public class IndexerSettingsModel
|
|||
[RequiredIf("FileSharingTalkEnabled", true, ErrorMessage = "Password Secret Required when File Sharing Talk is enabled")]
|
||||
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")]
|
||||
[Description("Enable downloading episodes from NZBsRus")]
|
||||
public bool NzbsRUsEnabled { get; set; }
|
||||
|
@ -61,6 +75,10 @@ public class IndexerSettingsModel
|
|||
[Description("Enable downloading episodes from NzbClub")]
|
||||
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")]
|
||||
[DataType(DataType.Text)]
|
||||
[DisplayName("Retention")]
|
||||
|
|
|
@ -28,7 +28,10 @@
|
|||
<label for="nzbIndexStatus">NzbIndex</label>
|
||||
|
||||
@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 id="stylized">
|
||||
@using (Html.BeginForm("SaveIndexers", "Settings", FormMethod.Post, new { id = "IndexersForm", name = "IndexersForm", @class = "settingsForm" }))
|
||||
|
@ -117,6 +120,25 @@
|
|||
</label>
|
||||
@Html.CheckBoxFor(m => m.NzbClubEnabled, new { @class = "inputClass checkClass enabledCheck" })
|
||||
</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 class="indexer-global-settings">
|
||||
|
@ -191,6 +213,9 @@
|
|||
|
||||
if (id == 'NzbClubEnabled')
|
||||
$('#nzbClubStatus').prop('checked', checked);
|
||||
|
||||
if (id == 'OmgwtfnzbsEnabled')
|
||||
$('#omgwtfnzbsStatus').prop('checked', checked);
|
||||
|
||||
$('.indexerStatusButton').button("refresh");
|
||||
reValidate();
|
||||
|
@ -217,6 +242,9 @@
|
|||
|
||||
if (id == 'nzbClubStatus')
|
||||
$('#NzbClubEnabled').prop('checked', checked);
|
||||
|
||||
if (id == 'omgwtfnzbsStatus')
|
||||
$('#OmgwtfnzbsEnabled').prop('checked', checked);
|
||||
|
||||
reValidate();
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue