1
0
mirror of https://github.com/moparisthebest/SickRage synced 2024-11-17 23:05:11 -05:00
SickRage/gui/slick/interfaces/default/config_providers.tmpl
2014-05-10 12:50:07 +01:00

599 lines
34 KiB
Cheetah

#import sickbeard
#from sickbeard.providers.generic import GenericProvider
#from sickbeard.providers import thepiratebay
#set global $title="Config - Providers"
#set global $header="Search Providers"
#set global $sbPath="../.."
#set global $topmenu="config"#
#import os.path
#include $os.path.join($sickbeard.PROG_DIR, "gui/slick/interfaces/default/inc_top.tmpl")
#if $varExists('header')
<h1 class="header">$header</h1>
#else
<h1 class="title">$title</h1>
#end if
<script type="text/javascript" src="$sbRoot/js/configProviders.js?$sbPID"></script>
<script type="text/javascript" src="$sbRoot/js/config.js?$sbPID"></script>
#if $sickbeard.USE_NZBS
<script type="text/javascript" charset="utf-8">
<!--
\$(document).ready(function(){
var show_nzb_providers = #if $sickbeard.USE_NZBS then "true" else "false"#;
#for $curNewznabProvider in $sickbeard.newznabProviderList:
\$(this).addProvider('$curNewznabProvider.getID()', '$curNewznabProvider.name', '$curNewznabProvider.url', '$curNewznabProvider.key', $int($curNewznabProvider.default), show_nzb_providers);
#end for
});
//-->
</script>
#end if
#if $sickbeard.USE_TORRENTS
<script type="text/javascript" charset="utf-8">
<!--
\$(document).ready(function(){
#for $curTorrentRssProvider in $sickbeard.torrentRssProviderList:
\$(this).addTorrentRssProvider('$curTorrentRssProvider.getID()', '$curTorrentRssProvider.name', '$curTorrentRssProvider.url');
#end for
});
//-->
</script>
#end if
<div id="config">
<div id="config-content">
<form id="configForm" action="saveProviders" method="post">
<div id="config-components">
<ul>
<li><a href="#core-component-group1">Provider Priorities</a></li>
<li><a href="#core-component-group2">Configure Built-In Providers</a></li>
#if $sickbeard.USE_NZBS
<li><a href="#core-component-group3">Configure Custom Newznab Providers</a></li>
#end if
#if $sickbeard.USE_TORRENTS
<li><a href="#core-component-group4">Configure Custom Torrent Providers</a></li>
#end if
</ul>
<div id="core-component-group1" class="component-group clearfix">
<div class="component-group-desc">
<h3>Provider Priorities</h3>
<p>Check off, configure and drag the providers into the order you want them to be used.</p>
<p>At least one provider is required but two are recommended.</p>
#if not $sickbeard.USE_NZBS or not $sickbeard.USE_TORRENTS:
<blockquote style="margin: 20px 0;">NZB/Torrent providers can be toggled in <b><a href="$sbRoot/config/search">Search Settings</a></b></blockquote>
#else:
<br/>
#end if
<div>
<h4 class="note">*</h4><p class="note">Provider does not support backlog searches at this time.</p>
<h4 class="note">**</h4><p class="note">Provider supports <b>limited</b> backlog searches, all episodes/qualities may not be available.</p>
<h4 class="note">!</h4><p class="note">Provider is <b>NOT WORKING</b>.</p>
</div>
</div>
<fieldset class="component-group-list" style="margin-left: 50px; margin-top:36px">
<ul id="provider_order_list">
#for $curProvider in $sickbeard.providers.sortedProviderList():
#if $curProvider.providerType == $GenericProvider.NZB and not $sickbeard.USE_NZBS:
#continue
#elif $curProvider.providerType == $GenericProvider.TORRENT and not $sickbeard.USE_TORRENTS:
#continue
#end if
#set $curName = $curProvider.getID()
<li class="ui-state-default" id="$curName">
<input type="checkbox" id="enable_$curName" class="provider_enabler" #if $curProvider.isEnabled() then "checked=\"checked\"" else ""#/>
<a href="$curProvider.url" class="imgLink" rel="noreferrer" onclick="window.open('${sickbeard.ANON_REDIRECT}' + this.href, '_blank'); return false;"><img src="$sbRoot/images/providers/$curProvider.imageName()" alt="$curProvider.name" title="$curProvider.name" width="16" height="16" /></a>
$curProvider.name
#if not $curProvider.supportsBacklog then "*" else ""#
#if $curProvider.name == "EZRSS" then "**" else ""#
<span class="ui-icon ui-icon-arrowthick-2-n-s pull-right"></span>
</li>
#end for
</ul>
<input type="hidden" name="provider_order" id="provider_order" value="<%=" ".join([x.getID()+':'+str(int(x.isEnabled())) for x in sickbeard.providers.sortedProviderList()])%>"/>
<br/><input type="submit" class="btn config_submitter" value="Save Changes" /><br/>
</fieldset>
</div><!-- /component-group1 //-->
<div id="core-component-group2" class="component-group clearfix">
<div class="component-group-desc">
<h3>Configure Built-In<br />Providers</h3>
<p>Check with provider's website on how to obtain an API key if needed.</p>
</div>
<fieldset class="component-group-list">
<div class="field-pair">
<label class="clearfix" for="editAProvider">
<span class="component-title jumbo">Configure Provider:</span>
<span class="component-desc">
#set $provider_config_list = []
#for $cur_provider in ("thepiratebay", "tvtorrents", "btn", "torrentleech", "iptorrents", "omgwtfnzbs", "kickasstorrents", "sceneaccess", "hdbits", "nextgen", "speedcd"):
#set $cur_provider_obj = $sickbeard.providers.getProviderClass($cur_provider)
#if $cur_provider_obj.providerType == $GenericProvider.NZB and not $sickbeard.USE_NZBS:
#continue
#elif $cur_provider_obj.providerType == $GenericProvider.TORRENT and not $sickbeard.USE_TORRENTS:
#continue
#end if
$provider_config_list.append($cur_provider_obj)
#end for
#if $provider_config_list:
<select id="editAProvider">
#for $cur_provider in $provider_config_list + [$curProvider for $curProvider in $sickbeard.newznabProviderList if $curProvider.default and $curProvider.needs_auth and $sickbeard.USE_NZBS]:
<option value="$cur_provider.getID()">$cur_provider.name</option>
#end for
</select>
#else:
No providers available to configure.
#end if
</span>
</label>
</div>
<!-- start div for editing providers //-->
#for $curNewznabProvider in [$curProvider for $curProvider in $sickbeard.newznabProviderList if $curProvider.default and $curProvider.needs_auth]:
<div class="providerDiv" id="${curNewznabProvider.getID()}Div">
<div class="field-pair">
<label class="clearfix">
<span class="component-title">URL:</span>
<input class="component-desc" type="text" id="${curNewznabProvider.getID()}_url" value="$curNewznabProvider.url" size="40" disabled/>
</label>
</div>
<div class="field-pair">
<label class="clearfix">
<span class="component-title">API Key:</span>
<input class="component-desc newznab_key" type="text" id="${curNewznabProvider.getID()}_hash" value="$curNewznabProvider.key" newznab_name="${curNewznabProvider.getID()}_hash" size="40" />
</label>
</div>
</div>
#end for
<div class="providerDiv" id="omgwtfnzbsDiv">
<div class="field-pair">
<label class="clearfix">
<span class="component-title">UserName:</span>
<input class="component-desc" type="text" name="omgwtfnzbs_username" value="$sickbeard.OMGWTFNZBS_USERNAME" size="10" />
</label>
</div>
<div class="field-pair">
<label class="clearfix">
<span class="component-title">API Key:</span>
<input class="component-desc" type="text" name="omgwtfnzbs_apikey" value="$sickbeard.OMGWTFNZBS_APIKEY" size="40" />
</label>
</div>
</div><!-- /omgwtfnzbsDiv //-->
<div class="providerDiv" id="ezrssDiv">
<div class="field-pair">
<label class="clearfix">
<span class="component-title" id="ezrss_ratio_desc">Seed Ratio:</span>
<input type="text" name="ezrss_ratio" id="ezrss_ratio" value="$sickbeard.EZRSS_RATIO" size="40" />
</label>
</div>
</div>
<div class="providerDiv" id="tvtorrentsDiv">
<div class="field-pair">
<label class="clearfix">
<span class="component-title">Digest:</span>
<input class="component-desc" type="text" name="tvtorrents_digest" value="$sickbeard.TVTORRENTS_DIGEST" size="40" />
</label>
</div>
<div class="field-pair">
<label class="clearfix">
<span class="component-title">Hash:</span>
<input class="component-desc" type="text" name="tvtorrents_hash" value="$sickbeard.TVTORRENTS_HASH" size="40" />
</label>
</div>
<div class="field-pair">
<label class="clearfix">
<span class="component-title" id="tvtorrents_ratio_desc">Seed Ratio:</span>
<input type="text" name="tvtorrents_ratio" id="tvtorrents_ratio" value="$sickbeard.TVTORRENTS_RATIO" size="40" />
</label>
</div>
</div>
<div class="providerDiv" id="thepiratebayDiv">
<div class="field-pair">
<label class="clearfix">
<span class="component-title" id="thepiratebay_ratio_desc">Seed Ratio:</span>
<input type="text" name="thepiratebay_ratio" id="thepiratebay_ratio" value="$sickbeard.THEPIRATEBAY_RATIO" size="40" />
</label>
</div>
<div class="field-pair">
<input type="checkbox" class="enabler" name="thepiratebay_proxy" id="thepiratebay_proxy" #if $sickbeard.THEPIRATEBAY_PROXY then "checked=\"checked\"" else ""#/>
<label class="clearfix">
<span class="component-title">Access TPB via Proxy</span>
<span class="component-desc">To bypass Country Blocking Mechanism</span>
</label>
</div>
<div class="field-pair content_thepiratebay_proxy" id="content_thepiratebay_proxy">
<label class="nocheck clearfix">
<span class="component-title">Proxy URL:</span>
<span class="component-desc">
<select name="thepiratebay_proxy_url" id="thepiratebay_proxy_url">
#for $i in $thepiratebay.proxy_dict.keys():
<option value="$thepiratebay.proxy_dict[$i]" #if $thepiratebay.proxy_dict[$i] == $sickbeard.THEPIRATEBAY_PROXY_URL then "selected=\"selected\"" else ""#>$i</option>
#end for
</select>
</span>
</label>
</div>
<div class="field-pair">
<input type="checkbox" name="thepiratebay_trusted" id="thepiratebay_trusted" #if $sickbeard.THEPIRATEBAY_TRUSTED then "checked=\"checked\"" else ""#/>
<label class="clearfix" for="thepiratebay_trusted">
<span class="component-title">Trusted Download</span>
<span class="component-desc">Download torrent only from trusted uploaders?</span>
</label>
</div>
</div>
<div class="providerDiv" id="kickasstorrentsDiv">
<div class="field-pair">
<label class="clearfix">
<span class="component-title" id="kat_ratio_desc">Seed Ratio:</span>
<input type="text" name="kat_ratio" id="kat_ratio" value="$sickbeard.KAT_RATIO" size="40" />
</label>
</div>
<div class="field-pair">
<input type="checkbox" name="kat_verified" id="kat_verified" #if $sickbeard.KAT_VERIFIED then "checked=\"checked\"" else ""#/>
<label class="clearfix" for="kat_verified">
<span class="component-title">Verified Only</span>
<span class="component-desc">Download only verified torrent?</span>
</label>
</div>
</div>
<div class="providerDiv" id="publichdDiv">
<div class="field-pair">
<label class="clearfix">
<span class="component-title" id="publichd_ratio_desc">Seed Ratio:</span>
<input type="text" name="publichd_ratio" id="publichd_ratio" value="$sickbeard.PUBLICHD_RATIO" size="40" />
</label>
</div>
</div>
<div class="providerDiv btn" id="btnDiv">
<div class="field-pair">
<label class="clearfix">
<span class="component-title">Api Key:</span>
<input class="component-desc" type="text" name="btn_api_key" value="$sickbeard.BTN_API_KEY" size="40" />
</label>
</div>
<div class="field-pair">
<label class="clearfix">
<span class="component-title" id="btn_ratio_desc">Seed Ratio:</span>
<input type="text" name="btn_ratio" id="btn_ratio" value="$sickbeard.BTN_RATIO" size="40" />
</label>
</div>
</div>
<div class="providerDiv" id="torrentleechDiv">
<div class="field-pair">
<label class="clearfix">
<span class="component-title">Username:</span>
<input class="component-desc" type="text" name="torrentleech_username" value="$sickbeard.TORRENTLEECH_USERNAME" size="40" />
</label>
</div>
<div class="field-pair">
<label class="clearfix">
<span class="component-title">Password:</span>
<input class="component-desc" type="password" name="torrentleech_password" value="$sickbeard.TORRENTLEECH_PASSWORD" size="40" />
</label>
</div>
<div class="field-pair">
<label class="clearfix">
<span class="component-title" id="torrentleech_ratio_desc">Seed Ratio:</span>
<input type="text" name="torrentleech_ratio" id="torrentleech_ratio" value="$sickbeard.TORRENTLEECH_RATIO" size="40" />
</label>
</div>
</div>
<div class="providerDiv" id="iptorrentsDiv">
<div class="field-pair">
<label class="clearfix">
<span class="component-title">Username:</span>
<input class="component-desc" type="text" name="iptorrents_username" value="$sickbeard.IPTORRENTS_USERNAME" size="40" />
</label>
</div>
<div class="field-pair">
<label class="clearfix">
<span class="component-title">Password:</span>
<input class="component-desc" type="password" name="iptorrents_password" value="$sickbeard.IPTORRENTS_PASSWORD" size="40" />
</label>
</div>
<div class="field-pair">
<label class="clearfix">
<span class="component-title" id="iptorrents_ratio_desc">Seed Ratio:</span>
<input type="text" name="iptorrents_ratio" id="iptorrents_ratio" value="$sickbeard.IPTORRENTS_RATIO" size="40" />
</label>
</div>
<div class="field-pair">
<input type="checkbox" name="iptorrents_freeleech" id="iptorrents_freeleech" #if $sickbeard.IPTORRENTS_FREELEECH then "checked=\"checked\"" else ""#/>
<label class="clearfix" for="iptorrents_freeleech">
<span class="component-title">FreeLeech</span>
<span class="component-desc">This will only download <b>[FreeLeech]</b> torrents.</span>
</label>
</div>
</div><!-- /iptorrentsDiv //-->
<div class="providerDiv" id="sceneaccessDiv">
<div class="field-pair">
<label class="clearfix">
<span class="component-title">Username:</span>
<input class="component-desc" type="text" name="scc_username" value="$sickbeard.SCC_USERNAME" size="40" />
</label>
</div>
<div class="field-pair">
<label class="clearfix">
<span class="component-title">Password:</span>
<input class="component-desc" type="password" name="scc_password" value="$sickbeard.SCC_PASSWORD" size="40" />
</label>
</div>
<div class="field-pair">
<label class="clearfix">
<span class="component-title" id="scc_ratio_desc">Seed Ratio:</span>
<input type="text" name="scc_ratio" id="scc_ratio" value="$sickbeard.SCC_RATIO" size="40" />
</label>
</div>
</div><!-- /sceneaccessDiv //-->
<div class="providerDiv" id="hdtorrentsDiv">
<div class="field-pair">
<label class="clearfix">
<span class="component-title">Username:</span>
<input class="component-desc" type="text" name="hdtorrents_username" value="$sickbeard.HDTORRENTS_USERNAME" size="40" />
</label>
</div>
<div class="field-pair">
<label class="clearfix">
<span class="component-title">Password:</span>
<input class="component-desc" type="password" name="hdtorrents_password" value="$sickbeard.HDTORRENTS_PASSWORD" size="40" />
</label>
</div>
<div class="field-pair">
<label class="clearfix">
<span class="component-title" id="hdtorrents_ratio_desc">Seed Ratio:</span>
<input type="text" name="hdtorrents_ratio" id="hdtorrents_ratio" value="$sickbeard.HDTORRENTS_RATIO" size="40" />
</label>
</div>
</div><!-- /sceneaccessDiv //-->
<div class="providerDiv" id="torrentdayDiv">
<div class="field-pair">
<label class="clearfix">
<span class="component-title">Username:</span>
<input class="component-desc" type="text" name="torrentday_username" value="$sickbeard.TORRENTDAY_USERNAME" size="40" />
</label>
</div>
<div class="field-pair">
<label class="clearfix">
<span class="component-title">Password:</span>
<input class="component-desc" type="password" name="torrentday_password" value="$sickbeard.TORRENTDAY_PASSWORD" size="40" />
</label>
</div>
<div class="field-pair">
<label class="clearfix">
<span class="component-title" id="torrentday_ratio_desc">Seed Ratio:</span>
<input type="text" name="torrentday_ratio" id="torrentday_ratio" value="$sickbeard.TORRENTDAY_RATIO" size="40" />
</label>
</div>
<div class="field-pair">
<input type="checkbox" name="torrentday_freeleech" id="torrentday_freeleech" #if $sickbeard.TORRENTDAY_FREELEECH then "checked=\"checked\"" else ""#/>
<label class="clearfix" for="torrentday_freeleech">
<span class="component-title">FreeLeech</span>
<span class="component-desc">This will only download <b>[FreeLeech]</b> torrents.</span>
</label>
</div>
</div><!-- /torrentsDayDiv //-->
<div class="providerDiv" id="nextgenDiv">
<div class="field-pair">
<label class="clearfix">
<span class="component-title">Username:</span>
<input class="component-desc" type="text" name="nextgen_username" value="$sickbeard.NEXTGEN_USERNAME" size="40" />
</label>
</div>
<div class="field-pair">
<label class="clearfix">
<span class="component-title">Password:</span>
<input class="component-desc" type="password" name="nextgen_password" value="$sickbeard.NEXTGEN_PASSWORD" size="40" />
</label>
</div>
<div class="field-pair">
<label class="clearfix">
<span class="component-title" id="nextgen_ratio_desc">Seed Ratio:</span>
<input type="text" name="nextgen_ratio" id="nextgen_ratio" value="$sickbeard.NEXTGEN_RATIO" size="40" />
</label>
</div>
</div><!-- /nextgenDiv //-->
<div class="providerDiv" id="hdbitsDiv">
<div class="field-pair">
<label class="clearfix">
<span class="component-title">Username:</span>
<input class="component-desc" type="text" name="hdbits_username" value="$sickbeard.HDBITS_USERNAME" size="40" />
</label>
</div>
<div class="field-pair">
<label class="clearfix">
<span class="component-title">Passkey:</span>
<input class="component-desc" type="text" name="hdbits_passkey" value="$sickbeard.HDBITS_PASSKEY" size="40" />
</label>
</div>
<div class="field-pair">
<label class="clearfix">
<span class="component-title" id="hdbits_ratio_desc">Seed Ratio:</span>
<input type="text" name="hdbits_ratio" id="hdbits_ratio" value="$sickbeard.HDBITS_RATIO" size="40" />
</label>
</div>
</div><!-- /hdbitsDiv //-->
<div class="providerDiv" id="speedcdDiv">
<div class="field-pair">
<label class="clearfix">
<span class="component-title">Username:</span>
<input class="component-desc" type="text" name="speedcd_username" value="$sickbeard.SPEEDCD_USERNAME" size="40" />
</label>
</div>
<div class="field-pair">
<label class="clearfix">
<span class="component-title">Password:</span>
<input class="component-desc" type="password" name="speedcd_password" value="$sickbeard.SPEEDCD_PASSWORD" size="40" />
</label>
</div>
<div class="field-pair">
<label class="clearfix">
<span class="component-title" id="speedcd_ratio_desc">Seed Ratio:</span>
<input type="text" name="speedcd_ratio" id="speedcd_ratio" value="$sickbeard.SPEEDCD_RATIO" size="40" />
</label>
</div>
<div class="field-pair">
<input type="checkbox" name="speedcd_freeleech" id="speedcd_freeleech" #if $sickbeard.SPEEDCD_FREELEECH then "checked=\"checked\"" else ""#/>
<label class="clearfix" for="iptorrents_freeleech">
<span class="component-title">FreeLeech</span>
<span class="component-desc">This will only download <b>[FreeLeech]</b> torrents.</span>
</label>
</div>
</div><!-- /speedcdDiv //-->
<!-- end div for editing providers -->
<input type="submit" class="btn config_submitter" value="Save Changes" /><br/>
</fieldset>
</div><!-- /component-group2 //-->
#if $sickbeard.USE_NZBS
<div id="core-component-group3" class="component-group clearfix">
<div class="component-group-desc">
<h3>Configure Custom<br />Newznab Providers</h3>
<p>Add and setup custom Newznab providers.</p>
<p>Some built-in Newznab providers are already available above.</p>
</div>
<fieldset class="component-group-list">
<div class="field-pair">
<label class="clearfix">
<span class="component-title jumbo">Select Provider:</span>
<span class="component-desc">
<input type="hidden" name="newznab_string" id="newznab_string" />
<select id="editANewznabProvider">
<option value="addNewznab">-- add new provider --</option>
</select>
</span>
</label>
</div>
<div class="newznabProviderDiv" id="addNewznab">
<div class="field-pair">
<label class="nocheck clearfix">
<span class="component-title">Provider Name</span>
<input class="component-desc" type="text" id="newznab_name" size="40" />
</label>
</div>
<div class="field-pair">
<label class="nocheck clearfix">
<span class="component-title">Site URL</span>
<input class="component-desc" type="text" id="newznab_url" size="40" />
</label>
</div>
<div class="field-pair">
<label class="nocheck clearfix">
<span class="component-title">API Key</span>
<input class="component-desc" type="text" id="newznab_key" size="40" />
</label>
<label class="nocheck clearfix">
<span class="component-title">&nbsp;</span>
<span class="component-desc">(if not required, type 0)</span>
</label>
</div>
<div id="newznab_add_div">
<input class="btn" type="button" class="newznab_save" id="newznab_add" value="Add" />
</div>
<div id="newznab_update_div" style="display: none;">
<input class="btn btn-danger newznab_delete" type="button" class="newznab_delete" id="newznab_delete" value="Delete" />
</div>
</div>
</fieldset>
</div><!-- /component-group3 //-->
#end if
#if $sickbeard.USE_TORRENTS:
<div id="core-component-group4" class="component-group clearfix">
<div class="component-group-desc">
<h3>Configure Custom Torrent Providers</h3>
<p>Add and setup custom RSS providers.</p>
<p>&nbsp;</p>
</div>
<fieldset class="component-group-list">
<div class="field-pair">
<label class="clearfix">
<span class="component-title jumbo">Select Provider:</span>
<span class="component-desc">
<input type="hidden" name="torrentrss_string" id="torrentrss_string" />
<select id="editATorrentRssProvider">
<option value="addTorrentRss">-- add new provider --</option>
</select>
</span>
</label>
</div>
<div class="torrentRssProviderDiv" id="addTorrentRss">
<div class="field-pair">
<label class="nocheck clearfix">
<span class="component-title">Provider Name:</span>
<input class="component-desc" type="text" id="torrentrss_name" size="20" />
</label>
</div>
<div class="field-pair">
<label class="nocheck clearfix">
<span class="component-title">RSS URL:</span>
<input class="component-desc" type="text" id="torrentrss_url" size="40" />
</label>
</div>
<div id="torrentrss_add_div">
<input type="button" class="btn torrentrss_save" id="torrentrss_add" value="Add" />
</div>
<div id="torrentrss_update_div" style="display: none;">
<input type="button" class="btn btn-danger torrentrss_delete" id="torrentrss_delete" value="Delete" />
</div>
</div>
</fieldset>
</div><!-- /component-group4 //-->
#end if
<br/><input type="submit" class="btn config_submitter" value="Save Changes" /><br/>
</div><!-- /config-components //-->
</form>
</div></div>
<div class="clearfix"></div>
<script type="text/javascript" charset="utf-8">
<!--
jQuery('#config-components').tabs();
//-->
</script>
#include $os.path.join($sickbeard.PROG_DIR,"gui/slick/interfaces/default/inc_bottom.tmpl")