|
|
|
@ -1,58 +1,26 @@
|
|
|
|
|
@using NzbDrone.Web.Helpers
|
|
|
|
|
@model NzbDrone.Web.Models.IndexerSettingsModel
|
|
|
|
|
@{ Layout = "~/Views/Shared/_ReferenceLayout.cshtml"; }
|
|
|
|
|
@section HeaderContent{
|
|
|
|
|
@Html.IncludeCss("Settings.css")
|
|
|
|
|
@Html.IncludeCss("IndexerSettings.css")
|
|
|
|
|
<style>
|
|
|
|
|
.indexerPanel
|
|
|
|
|
{
|
|
|
|
|
overflow: auto;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.retentionContainer
|
|
|
|
|
{
|
|
|
|
|
padding-top: 20px;
|
|
|
|
|
overflow: hidden;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.indexerStatusContainer {
|
|
|
|
|
margin-left: 12px;
|
|
|
|
|
margin-bottom: -4px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.indexerStatus {
|
|
|
|
|
padding: 6px 10px;
|
|
|
|
|
display: inline-block;
|
|
|
|
|
color: white;
|
|
|
|
|
|
|
|
|
|
margin: 3px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.enabled {
|
|
|
|
|
background-color: #065EFE;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.disabled {
|
|
|
|
|
background-color: #616161;
|
|
|
|
|
}
|
|
|
|
|
</style>
|
|
|
|
|
}
|
|
|
|
|
@{ Layout = null; }
|
|
|
|
|
<div class="infoBox">
|
|
|
|
|
RSS feeds are checked every 25 minutes for new episodes.</div>
|
|
|
|
|
|
|
|
|
|
<div class="indexerStatusContainer">
|
|
|
|
|
<div class="indexerStatus disabled" id="nzbsOrgStatus" title="Enabled/Disabled">Nzbs.Org</div>
|
|
|
|
|
<div class="indexerStatus disabled" id="nzbMatrixStatus" title="Enabled/Disabled">NZBMatrix</div>
|
|
|
|
|
<div class="indexerStatus disabled" id="nzbsRusStatus" title="Enabled/Disabled">NZBsRus</div>
|
|
|
|
|
<div class="indexerStatus disabled" id="newzbinStatus" title="Enabled/Disabled">Newzbin</div>
|
|
|
|
|
<div class="indexerStatus disabled" id="newznabStatus" title="Enabled/Disabled">Newznab</div>
|
|
|
|
|
<div class="indexerStatus disabled" id="nzbsOrgStatus" title="Enabled/Disabled">
|
|
|
|
|
Nzbs.Org</div>
|
|
|
|
|
<div class="indexerStatus disabled" id="nzbMatrixStatus" title="Enabled/Disabled">
|
|
|
|
|
NZBMatrix</div>
|
|
|
|
|
<div class="indexerStatus disabled" id="nzbsRusStatus" title="Enabled/Disabled">
|
|
|
|
|
NZBsRus</div>
|
|
|
|
|
<div class="indexerStatus disabled" id="newzbinStatus" title="Enabled/Disabled">
|
|
|
|
|
Newzbin</div>
|
|
|
|
|
<div class="indexerStatus disabled" id="newznabStatus" title="Enabled/Disabled">
|
|
|
|
|
Newznab</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div id="stylized">
|
|
|
|
|
@using (Html.BeginForm("SaveIndexers", "Settings", FormMethod.Post, new { id = "IndexersForm", name = "IndexersForm", @class = "settingsForm" }))
|
|
|
|
|
{
|
|
|
|
|
<div class="jquery-accordion">
|
|
|
|
|
<h3><a href="#">NZBs.org</a></h3>
|
|
|
|
|
<h3>
|
|
|
|
|
<a href="#">NZBs.org</a></h3>
|
|
|
|
|
<div class="indexerPanel">
|
|
|
|
|
<label class="labelClass">
|
|
|
|
|
Enable <span class="small">@Html.DescriptionFor(m => m.NzbsOrgEnabled)</span>
|
|
|
|
@ -67,8 +35,8 @@
|
|
|
|
|
</label>
|
|
|
|
|
@Html.TextBoxFor(m => m.NzbsOrgHash, new { @class = "inputClass" })
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<h3><a href="#">NZBMatrix</a></h3>
|
|
|
|
|
<h3>
|
|
|
|
|
<a href="#">NZBMatrix</a></h3>
|
|
|
|
|
<div class="indexerPanel">
|
|
|
|
|
<label class="labelClass">
|
|
|
|
|
Enable <span class="small">@Html.DescriptionFor(m => m.NzbMatrixEnabled)</span>
|
|
|
|
@ -83,10 +51,11 @@
|
|
|
|
|
</label>
|
|
|
|
|
@Html.TextBoxFor(m => m.NzbMatrixApiKey, new { @class = "inputClass" })
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<h3><a href="#">NZBsRus</a></h3>
|
|
|
|
|
<h3>
|
|
|
|
|
<a href="#">NZBsRus</a></h3>
|
|
|
|
|
<div class="indexerPanel">
|
|
|
|
|
<div class="warningBox">NZBsRus does not support backlog searching</div>
|
|
|
|
|
<div class="warningBox">
|
|
|
|
|
NZBsRus does not support backlog searching</div>
|
|
|
|
|
<label class="labelClass">
|
|
|
|
|
Enable <span class="small">@Html.DescriptionFor(m => m.NzbsRUsEnabled)</span>
|
|
|
|
|
</label>
|
|
|
|
@ -100,8 +69,8 @@
|
|
|
|
|
</label>
|
|
|
|
|
@Html.TextBoxFor(m => m.NzbsrusHash, new { @class = "inputClass" })
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<h3><a href="#">Newzbin</a></h3>
|
|
|
|
|
<h3>
|
|
|
|
|
<a href="#">Newzbin</a></h3>
|
|
|
|
|
<div class="indexerPanel">
|
|
|
|
|
<label class="labelClass">
|
|
|
|
|
Enable <span class="small">@Html.DescriptionFor(m => m.NewzbinEnabled)</span>
|
|
|
|
@ -116,8 +85,8 @@
|
|
|
|
|
</label>
|
|
|
|
|
@Html.TextBoxFor(m => m.NewzbinPassword, new { @class = "inputClass", type = "password" })
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<h3><a href="#">Newznab</a></h3>
|
|
|
|
|
<h3>
|
|
|
|
|
<a href="#">Newznab</a></h3>
|
|
|
|
|
<div class="indexerPanel">
|
|
|
|
|
<label class="labelClass">
|
|
|
|
|
Enable <span class="small">@Html.DescriptionFor(m => m.NewznabEnabled)</span>
|
|
|
|
@ -142,7 +111,6 @@
|
|
|
|
|
|
|
|
|
|
<div class="retentionContainer">
|
|
|
|
|
@Html.ValidationSummary(true, "Unable to save your settings. Please correct the errors and try again.")
|
|
|
|
|
|
|
|
|
|
<label class="labelClass">@Html.LabelFor(m => m.Retention)
|
|
|
|
|
<span class="small">@Html.DescriptionFor(m => m.Retention)</span>
|
|
|
|
|
</label>
|
|
|
|
@ -153,87 +121,85 @@
|
|
|
|
|
Save</button>
|
|
|
|
|
}
|
|
|
|
|
</div>
|
|
|
|
|
@section Scripts{
|
|
|
|
|
<script type="text/javascript">
|
|
|
|
|
$(document).ready(function() {
|
|
|
|
|
if ($('#NzbsOrgEnabled').attr('checked'))
|
|
|
|
|
$('#nzbsOrgStatus').toggleClass('enabled disabled');
|
|
|
|
|
<script type="text/javascript">
|
|
|
|
|
$(document).ready(function () {
|
|
|
|
|
if ($('#NzbsOrgEnabled').attr('checked'))
|
|
|
|
|
$('#nzbsOrgStatus').toggleClass('enabled disabled');
|
|
|
|
|
|
|
|
|
|
if ($('#NzbMatrixEnabled').attr('checked'))
|
|
|
|
|
$('#nzbMatrixStatus').toggleClass('enabled disabled');
|
|
|
|
|
if ($('#NzbMatrixEnabled').attr('checked'))
|
|
|
|
|
$('#nzbMatrixStatus').toggleClass('enabled disabled');
|
|
|
|
|
|
|
|
|
|
if ($('#NzbsRUsEnabled').attr('checked'))
|
|
|
|
|
$('#nzbsRusStatus').toggleClass('enabled disabled');
|
|
|
|
|
if ($('#NzbsRUsEnabled').attr('checked'))
|
|
|
|
|
$('#nzbsRusStatus').toggleClass('enabled disabled');
|
|
|
|
|
|
|
|
|
|
if ($('#NewzbinEnabled').attr('checked'))
|
|
|
|
|
$('#newzbinStatus').toggleClass('enabled disabled');
|
|
|
|
|
if ($('#NewzbinEnabled').attr('checked'))
|
|
|
|
|
$('#newzbinStatus').toggleClass('enabled disabled');
|
|
|
|
|
|
|
|
|
|
if ($('#NewznabEnabled').attr('checked'))
|
|
|
|
|
$('#newznabStatus').toggleClass('enabled disabled');
|
|
|
|
|
});
|
|
|
|
|
if ($('#NewznabEnabled').attr('checked'))
|
|
|
|
|
$('#newznabStatus').toggleClass('enabled disabled');
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
$('.enabledCheck').on('change', function () {
|
|
|
|
|
var id = $(this).attr('id');
|
|
|
|
|
|
|
|
|
|
$('.enabledCheck').on('change', function () {
|
|
|
|
|
var id = $(this).attr('id');
|
|
|
|
|
if (id == 'NzbsOrgEnabled')
|
|
|
|
|
$('#nzbsOrgStatus').toggleClass('enabled disabled');
|
|
|
|
|
|
|
|
|
|
if (id == 'NzbsOrgEnabled')
|
|
|
|
|
$('#nzbsOrgStatus').toggleClass('enabled disabled');
|
|
|
|
|
if (id == 'NzbMatrixEnabled')
|
|
|
|
|
$('#nzbMatrixStatus').toggleClass('enabled disabled');
|
|
|
|
|
|
|
|
|
|
if (id == 'NzbMatrixEnabled')
|
|
|
|
|
$('#nzbMatrixStatus').toggleClass('enabled disabled');
|
|
|
|
|
if (id == 'NzbsRUsEnabled')
|
|
|
|
|
$('#nzbsRusStatus').toggleClass('enabled disabled');
|
|
|
|
|
|
|
|
|
|
if (id == 'NzbsRUsEnabled')
|
|
|
|
|
$('#nzbsRusStatus').toggleClass('enabled disabled');
|
|
|
|
|
if (id == 'NewzbinEnabled')
|
|
|
|
|
$('#newzbinStatus').toggleClass('enabled disabled');
|
|
|
|
|
|
|
|
|
|
if (id == 'NewzbinEnabled')
|
|
|
|
|
$('#newzbinStatus').toggleClass('enabled disabled');
|
|
|
|
|
if (id == 'NewznabEnabled')
|
|
|
|
|
$('#newznabStatus').toggleClass('enabled disabled');
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
if (id == 'NewznabEnabled')
|
|
|
|
|
$('#newznabStatus').toggleClass('enabled disabled');
|
|
|
|
|
$("#addItem").live('click', function () {
|
|
|
|
|
$.ajax({
|
|
|
|
|
url: this.href,
|
|
|
|
|
cache: false,
|
|
|
|
|
success: function (html) {
|
|
|
|
|
$("#newznabProviders").append(html);
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
return false;
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
var deleteNewznabProviderUrl = '@Url.Action("DeleteNewznabProvider", "Settings")';
|
|
|
|
|
|
|
|
|
|
function deleteProvider(id) {
|
|
|
|
|
$.ajax({
|
|
|
|
|
type: "POST",
|
|
|
|
|
url: deleteNewznabProviderUrl,
|
|
|
|
|
data: jQuery.param({ providerId: id }),
|
|
|
|
|
error: function (req, status, error) {
|
|
|
|
|
alert("Sorry! We could not delete your Provider at this time. " + error);
|
|
|
|
|
},
|
|
|
|
|
success: function (data, textStatus, jqXHR) {
|
|
|
|
|
if (data == "ok") {
|
|
|
|
|
$("#provider_" + id).remove();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$("#addItem").live('click', function () {
|
|
|
|
|
$.ajax({
|
|
|
|
|
url: this.href,
|
|
|
|
|
cache: false,
|
|
|
|
|
success: function (html) {
|
|
|
|
|
$("#newznabProviders").append(html);
|
|
|
|
|
else {
|
|
|
|
|
alert(data);
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var deleteNewznabProviderUrl = '@Url.Action("DeleteNewznabProvider", "Settings")';
|
|
|
|
|
|
|
|
|
|
function deleteProvider(id) {
|
|
|
|
|
$.ajax({
|
|
|
|
|
type: "POST",
|
|
|
|
|
url: deleteNewznabProviderUrl,
|
|
|
|
|
data: jQuery.param({ providerId: id }),
|
|
|
|
|
error: function (req, status, error) {
|
|
|
|
|
alert("Sorry! We could not delete your Provider at this time. " + error);
|
|
|
|
|
},
|
|
|
|
|
success: function (data, textStatus, jqXHR) {
|
|
|
|
|
if (data == "ok") {
|
|
|
|
|
$("#provider_" + id).remove();
|
|
|
|
|
}
|
|
|
|
|
function getProviderId(obj) {
|
|
|
|
|
var parentProviderSection = $(obj).parents('.providerSection');
|
|
|
|
|
return parentProviderSection.children('.newznabProviderId').val();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
else {
|
|
|
|
|
alert(data);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function getProviderId(obj) {
|
|
|
|
|
var parentProviderSection = $(obj).parents('.providerSection');
|
|
|
|
|
return parentProviderSection.children('.newznabProviderId').val();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$(".providerName_textbox").live('keyup', function () {
|
|
|
|
|
var value = $(this).val();
|
|
|
|
|
var profileId = getProviderId(this);
|
|
|
|
|
$("#title_" + profileId).text(value);
|
|
|
|
|
}).keyup();
|
|
|
|
|
|
|
|
|
|
</script>
|
|
|
|
|
}
|
|
|
|
|
$(".providerName_textbox").live('keyup', function () {
|
|
|
|
|
var value = $(this).val();
|
|
|
|
|
var profileId = getProviderId(this);
|
|
|
|
|
$("#title_" + profileId).text(value);
|
|
|
|
|
}).keyup();
|
|
|
|
|
|
|
|
|
|
</script>
|
|
|
|
|