2014-03-10 05:18:05 +00:00
#import sickbeard
#from sickbeard . providers . generic import GenericProvider
#from sickbeard . providers import thepiratebay
2015-02-24 13:37:27 +00:00
#from sickbeard . helpers import anon_url , starify
2015-05-07 00:36:40 +00:00
##
2015-07-13 09:39:20 +00:00
#set global $ title = ' Config - Providers '
#set global $ header = ' Search Providers '
2014-11-21 18:40:00 +00:00
#set global $ sbPath = ' ../.. '
#set global $ topmenu = ' config '
2015-05-07 00:36:40 +00:00
##
2014-03-10 05:18:05 +00:00
#import os . path
2014-11-21 18:40:00 +00:00
#include $ os . path . join ( $ sickbeard . PROG_DIR , ' gui/slick/interfaces/default/inc_top.tmpl ' )
2014-10-21 19:09:01 +00:00
2015-09-18 00:06:34 +00:00
#if $ varExists ( ' header ' )
2014-11-21 18:40:00 +00:00
<h1 class="header"> $ header </h1>
2015-09-18 00:06:34 +00:00
#else
2014-11-21 18:40:00 +00:00
<h1 class="title"> $ title </h1>
2014-03-10 05:18:05 +00:00
#end if
2014-11-21 18:40:00 +00:00
2015-09-12 07:17:26 +00:00
<script type="text/javascript" src=" $ sbRoot /js/configProviders.js?v= $ sbPID "></script>
<script type="text/javascript" src=" $ sbRoot /js/config.js?v= $ sbPID "></script>
2014-11-21 18:40:00 +00:00
#set $ methods_notused = [ ]
#if not $ sickbeard . USE_NZBS
$ methods_notused . append ('Newznab')
#end if
#if not $ sickbeard . USE_TORRENTS
$ methods_notused . append ('Torrent')
2014-03-10 05:18:05 +00:00
#end if
2014-11-21 18:40:00 +00:00
#if $ sickbeard . USE_NZBS or $ sickbeard . USE_TORRENTS
2014-03-10 05:18:05 +00:00
<script type="text/javascript" charset="utf-8">
<!--
\$(document).ready(function(){
2014-11-21 18:40:00 +00:00
#if $ sickbeard . USE_NZBS
var show_nzb_providers = <%= 'true' if sickbeard.USE_NZBS else 'false' %>;
#for $ curNewznabProvider in $ sickbeard . newznabProviderList :
2015-07-13 09:39:20 +00:00
\$(this).addProvider(' $ curNewznabProvider . get_id ()', ' $ curNewznabProvider . name ', ' $ curNewznabProvider . url ', '<%= starify(curNewznabProvider.key) %>', ' $ curNewznabProvider . cat_ids ', $ int ( $ curNewznabProvider . default ), show_nzb_providers);
2014-11-21 18:40:00 +00:00
#end for
#end if
#if $ sickbeard . USE_TORRENTS
#for $ curTorrentRssProvider in $ sickbeard . torrentRssProviderList :
2015-07-13 09:39:20 +00:00
\$(this).addTorrentRssProvider(' $ curTorrentRssProvider . get_id ()', ' $ curTorrentRssProvider . name ', ' $ curTorrentRssProvider . url ', '<%= starify(curTorrentRssProvider.cookies) %>');
2014-11-21 18:40:00 +00:00
#end for
#end if
2014-03-10 05:18:05 +00:00
});
//-->
</script>
#end if
2015-05-07 00:36:40 +00:00
##
#set $ html_selected = ' selected= " selected " '
#set $ html_checked = ' checked= " checked " '
2014-11-21 18:40:00 +00:00
<div id="config" class="search_providers">
<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 " >Provider Options</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">
<fieldset class="component-group-list">
<div class="component-group-desc">
<h3>Provider Priorities</h3>
<p>Check off 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 $ methods_notused
2015-07-13 09:39:20 +00:00
<blockquote style="margin:20px 0"><%= '/'.join(x for x in methods_notused) %> providers can be enabled in <a href=" $ sbRoot /config/search/">Search Settings</a></blockquote>
2014-11-21 18:40:00 +00:00
#else
<br/>
#end if
</div>
<ul id="provider_order_list" class="provider_order_panel">
#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
2015-07-13 09:39:20 +00:00
#set $ curName = $ curProvider . get_id ( )
2014-11-21 18:40:00 +00:00
<li class="ui-state-default" id=" $ curName ">
2015-07-13 09:39:20 +00:00
<input type="checkbox" id="enable_ $ curName " class="provider_enabler" <%= html_checked if curProvider.is_enabled() else '' %>/>
<a href="<%= anon_url(curProvider.url) %>" class="imgLink" rel="noreferrer" onclick="window.open(this.href, '_blank'); return false;"><img src=" $ sbRoot /images/providers/ $ curProvider . image_name ()" alt=" $ curProvider . name " title=" $ curProvider . name " width="16" height="16" style="vertical-align:middle;"/></a>
<span style="vertical-align:middle"> $ curProvider . name </span>
2014-11-21 18:40:00 +00:00
<%= '*' if not curProvider.supportsBacklog else '' %>
<span class="ui-icon ui-icon-arrowthick-2-n-s pull-right" style="margin-top:3px"></span>
</li>
#end for
</ul>
<div id="provider_key">
<h4 class="note">*</h4><p class="note">Provider does not support backlog searches at this time</p>
#if $ sickbeard . USE_TORRENTS
<h4 class="note">**</h4><p class="note">Provider supports <b>limited</b> backlog searches, some episodes/qualities may not be available</p>
#end if
##<h4 class="note">!</h4><p class="note">Provider is <b>NOT WORKING</b></p>
</div>
2015-07-13 09:39:20 +00:00
<input type="hidden" name="provider_order" id="provider_order" value="<%=' '.join([x.get_id()+':'+str(int(x.is_enabled())) for x in sickbeard.providers.sortedProviderList()])%>"/>
2014-11-21 18:40:00 +00:00
<div style="width: 300px; float: right">
<div style="margin: 0px auto; width: 101px">
<input type="submit" class="btn config_submitter" value="Save Changes" />
</div>
</div>
</fieldset>
</div><!-- /component-group1 //-->
<div id="core-component-group2" class="component-group">
<div class="component-group-desc">
<h3>Provider Options</h3>
<p>Configure individual provider settings here.</p>
</div>
<fieldset class="component-group-list">
<div class="field-pair">
<label for="editAProvider">
<span class="component-title">Configure provider:</span>
<span class="component-desc">
#set $ provider_config_list_enabled = [ ]
#set $ provider_config_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
2015-07-13 09:39:20 +00:00
#if $ curProvider . is_enabled ( )
2014-11-21 18:40:00 +00:00
$ provider_config_list_enabled . append ( $ curProvider )
#else
$ provider_config_list . append ( $ curProvider )
#end if
#end for
#if $ provider_config_list + $ provider_config_list_enabled
<select id="editAProvider" class="form-control input-sm">
#if $ provider_config_list_enabled
<optgroup label="Enabled...">
#for $ cur_provider in $ provider_config_list_enabled :
2015-07-13 09:39:20 +00:00
<option value=" $ cur_provider . get_id ()"> $ cur_provider . name </option>
2014-11-21 18:40:00 +00:00
#end for
</optgroup>
#end if
#if $ provider_config_list
<optgroup label="Not Enabled...">
#for $ cur_provider in $ provider_config_list
2015-07-13 09:39:20 +00:00
<option value=" $ cur_provider . get_id ()"> $ cur_provider . name </option>
2014-11-21 18:40:00 +00:00
#end for
</optgroup>
#end if
</select><p>note: must refresh browser after saving enabled providers for an up to date list</p>
#else
<p>No providers available to configure</p>
#end if
</span>
</label>
</div>
<!-- start div for editing providers //-->
#for $ curNewznabProvider in [ $ curProvider for $ curProvider in $ sickbeard . newznabProviderList ]
2015-07-13 09:39:20 +00:00
<div class="providerDiv" id=" ${ curNewznabProvider . get_id ( ) } Div">
2014-11-21 18:40:00 +00:00
#if $ curNewznabProvider . default and $ curNewznabProvider . needs_auth
<div class="field-pair">
2015-07-13 09:39:20 +00:00
<label for=" ${ curNewznabProvider . get_id ( ) } _url">
2014-11-21 18:40:00 +00:00
<span class="component-title">URL</span>
<span class="component-desc">
2015-07-13 09:39:20 +00:00
<input type="text" id=" ${ curNewznabProvider . get_id ( ) } _url" value=" $ curNewznabProvider . url " class="form-control input-sm input350" disabled/>
2014-11-21 18:40:00 +00:00
</span>
</label>
</div>
<div class="field-pair">
2015-07-13 09:39:20 +00:00
<label for=" ${ curNewznabProvider . get_id ( ) } _hash">
2014-11-21 18:40:00 +00:00
<span class="component-title">API key</span>
<span class="component-desc">
2015-07-13 09:39:20 +00:00
<input type="text" id=" ${ curNewznabProvider . get_id ( ) } _hash" value="<%= starify(curNewznabProvider.key) %>" newznab_name=" ${ curNewznabProvider . get_id ( ) } _hash" class="newznab_key form-control input-sm input350" />
2014-11-21 18:40:00 +00:00
<div class="clear-left"><p>get API key from provider website</p></div>
</span>
</label>
</div>
#end if
2015-07-13 09:39:20 +00:00
#if $ hasattr ( $ curNewznabProvider , ' enable_recentsearch ' ) and $ curNewznabProvider . supportsBacklog :
2014-11-21 18:40:00 +00:00
<div class="field-pair">
2015-07-13 09:39:20 +00:00
<label for=" ${ curNewznabProvider . get_id ( ) } _enable_recentsearch">
2014-12-22 18:30:53 +00:00
<span class="component-title">Enable recent searches</span>
2014-11-21 18:40:00 +00:00
<span class="component-desc">
2015-07-13 09:39:20 +00:00
<input type="checkbox" name=" ${ curNewznabProvider . get_id ( ) } _enable_recentsearch" id=" ${ curNewznabProvider . get_id ( ) } _enable_recentsearch" <%= html_checked if curNewznabProvider.enable_recentsearch else '' %>/>
2014-12-22 18:30:53 +00:00
<p>perform recent searches at provider</p>
2014-11-21 18:40:00 +00:00
</span>
</label>
</div>
#end if
2015-07-13 09:39:20 +00:00
#if $ hasattr ( $ curNewznabProvider , ' enable_backlog ' ) and $ curNewznabProvider . supportsBacklog :
2014-11-21 18:40:00 +00:00
<div class="field-pair">
2015-07-13 09:39:20 +00:00
<label for=" ${ curNewznabProvider . get_id ( ) } _enable_backlog">
2014-11-21 18:40:00 +00:00
<span class="component-title">Enable backlog searches</span>
<span class="component-desc">
2015-07-13 09:39:20 +00:00
<input type="checkbox" name=" ${ curNewznabProvider . get_id ( ) } _enable_backlog" id=" ${ curNewznabProvider . get_id ( ) } _enable_backlog" <%= html_checked if curNewznabProvider.enable_backlog else '' %>/>
2014-11-21 18:40:00 +00:00
<p>perform backlog searches at provider</p>
</span>
</label>
</div>
#end if
2015-07-13 09:39:20 +00:00
#if $ hasattr ( $ curNewznabProvider , ' search_mode ' ) and $ curNewznabProvider . supportsBacklog :
2014-11-21 18:40:00 +00:00
<div class="field-pair">
<span class="component-title">Season search mode</span>
<span class="component-desc">
<label class="space-right">
2015-07-13 09:39:20 +00:00
<input type="radio" name=" ${ curNewznabProvider . get_id ( ) } _search_mode" id=" ${ curNewznabProvider . get_id ( ) } _search_mode_sponly" value="sponly" <%= html_checked if 'sponly' == curNewznabProvider.search_mode else '' %>/>season packs only
2014-11-21 18:40:00 +00:00
</label>
<label>
2015-07-13 09:39:20 +00:00
<input type="radio" name=" ${ curNewznabProvider . get_id ( ) } _search_mode" id=" ${ curNewznabProvider . get_id ( ) } _search_mode_eponly" value="eponly" <%= html_checked if 'eponly' == curNewznabProvider.search_mode else '' %>/>episodes only
2014-11-21 18:40:00 +00:00
</label>
<p>when searching for complete seasons, search for packs or collect single episodes</p>
</span>
</div>
#end if
2015-07-13 09:39:20 +00:00
#if $ hasattr ( $ curNewznabProvider , ' search_fallback ' ) and $ curNewznabProvider . supportsBacklog :
2014-11-21 18:40:00 +00:00
<div class="field-pair">
2015-07-13 09:39:20 +00:00
<label for=" ${ curNewznabProvider . get_id ( ) } _search_fallback">
2014-11-21 18:40:00 +00:00
<span class="component-title">Season search fallback</span>
<span class="component-desc">
2015-07-13 09:39:20 +00:00
<input type="checkbox" name=" ${ curNewznabProvider . get_id ( ) } _search_fallback" id=" ${ curNewznabProvider . get_id ( ) } _search_fallback" <%= html_checked if curNewznabProvider.search_fallback else '' %>/>
2014-11-21 18:40:00 +00:00
<p>run the alternate season search mode when a complete season is not found</p>
</span>
</label>
</div>
#end if
</div>
#end for
2015-07-13 09:39:20 +00:00
##
2014-11-21 18:40:00 +00:00
2015-07-13 09:39:20 +00:00
##
2014-11-21 18:40:00 +00:00
#for $ curNzbProvider in [ $ curProvider for $ curProvider in $ sickbeard . providers . sortedProviderList ( ) if $ curProvider . providerType == $ GenericProvider . NZB and $ curProvider not in $ sickbeard . newznabProviderList ] :
2015-07-13 09:39:20 +00:00
<div class="providerDiv" id=" ${ curNzbProvider . get_id ( ) } Div">
2014-11-21 18:40:00 +00:00
#if $ hasattr ( $ curNzbProvider , ' username ' ) :
<div class="field-pair">
2015-07-13 09:39:20 +00:00
<label for=" ${ curNzbProvider . get_id ( ) } _username">
2014-11-21 18:40:00 +00:00
<span class="component-title">Username</span>
<span class="component-desc">
2015-07-13 09:39:20 +00:00
<input type="text" name=" ${ curNzbProvider . get_id ( ) } _username" value=" $ curNzbProvider . username " class="form-control input-sm input350" />
2014-11-21 18:40:00 +00:00
</span>
</label>
</div>
#end if
#if $ hasattr ( $ curNzbProvider , ' api_key ' ) :
<div class="field-pair">
2015-07-13 09:39:20 +00:00
<label for=" ${ curNzbProvider . get_id ( ) } _api_key">
2014-11-21 18:40:00 +00:00
<span class="component-title">API key</span>
<span class="component-desc">
2015-07-13 09:39:20 +00:00
#set $ field_name = curNzbProvider . get_id ( ) + ' _api_key '
<input type="text" name=" $ field_name " value="<%= starify(curNzbProvider.api_key) %>" class="form-control input-sm input350" />
2015-09-18 00:06:34 +00:00
#if callable ( getattr ( curNzbProvider , ' ui_string ' , None ) )
2015-07-13 09:39:20 +00:00
<div class="clear-left"><p> ${ curNzbProvider . ui_string ( $ field_name ) } </p></div>
#end if
2014-11-21 18:40:00 +00:00
</span>
</label>
</div>
#end if
2015-07-13 09:39:20 +00:00
#if $ hasattr ( $ curNzbProvider , ' enable_recentsearch ' ) and $ curNzbProvider . supportsBacklog :
2014-11-21 18:40:00 +00:00
<div class="field-pair">
2015-07-13 09:39:20 +00:00
<label for=" ${ curNzbProvider . get_id ( ) } _enable_recentsearch">
2014-12-22 18:30:53 +00:00
<span class="component-title">Enable recent searches</span>
2014-11-21 18:40:00 +00:00
<span class="component-desc">
2015-07-13 09:39:20 +00:00
<input type="checkbox" name=" ${ curNzbProvider . get_id ( ) } _enable_recentsearch" id=" ${ curNzbProvider . get_id ( ) } _enable_recentsearch" <%= html_checked if curNzbProvider.enable_recentsearch else '' %>/>
2014-12-22 18:30:53 +00:00
<p>enable provider to perform recent searches.</p>
2014-11-21 18:40:00 +00:00
</span>
</label>
</div>
#end if
2015-07-13 09:39:20 +00:00
#if $ hasattr ( $ curNzbProvider , ' enable_backlog ' ) and $ curNzbProvider . supportsBacklog :
2014-11-21 18:40:00 +00:00
<div class="field-pair">
2015-07-13 09:39:20 +00:00
<label for=" ${ curNzbProvider . get_id ( ) } _enable_backlog">
2014-11-21 18:40:00 +00:00
<span class="component-title">Enable backlog searches</span>
<span class="component-desc">
2015-07-13 09:39:20 +00:00
<input type="checkbox" name=" ${ curNzbProvider . get_id ( ) } _enable_backlog" id=" ${ curNzbProvider . get_id ( ) } _enable_backlog" <%= html_checked if curNzbProvider.enable_backlog else '' %>/>
2014-11-21 18:40:00 +00:00
<p>enable provider to perform backlog searches.</p>
</span>
</label>
</div>
#end if
2015-07-13 09:39:20 +00:00
#if $ hasattr ( $ curNzbProvider , ' search_mode ' ) and $ curNzbProvider . supportsBacklog :
2014-11-21 18:40:00 +00:00
<div class="field-pair">
2015-07-13 09:39:20 +00:00
<span class="component-title">Season search mode</span>
<span class="component-desc">
<label class="space-right">
<input type="radio" name=" ${ curNzbProvider . get_id ( ) } _search_mode" id=" ${ curNzbProvider . get_id ( ) } _search_mode_sponly" value="sponly" <%= html_checked if 'sponly' == curNzbProvider.search_mode else '' %>/>season packs only
</label>
<label>
<input type="radio" name=" ${ curNzbProvider . get_id ( ) } _search_mode" id=" ${ curNzbProvider . get_id ( ) } _search_mode_eponly" value="eponly" <%= html_checked if 'eponly' == curNzbProvider.search_mode else '' %>/>episodes only
</label>
<p>when searching for complete seasons, search for packs or collect single episodes</p>
</span>
</div>
#end if
#if $ hasattr ( $ curNzbProvider , ' search_fallback ' ) and $ curNzbProvider . supportsBacklog :
<div class="field-pair">
<label for=" ${ curNzbProvider . get_id ( ) } _search_fallback">
2014-11-21 18:40:00 +00:00
<span class="component-title">Season search fallback</span>
<span class="component-desc">
2015-07-13 09:39:20 +00:00
<input type="checkbox" name=" ${ curNzbProvider . get_id ( ) } _search_fallback" id=" ${ curNzbProvider . get_id ( ) } _search_fallback" <%= html_checked if curNzbProvider.search_fallback else '' %>/>
<p>run the alternate season search mode when a complete season is not found</p>
2014-11-21 18:40:00 +00:00
</span>
</label>
</div>
#end if
2015-07-13 09:39:20 +00:00
#if not $ curNzbProvider . supportsBacklog :
2014-11-21 18:40:00 +00:00
<div class="field-pair">
2015-07-13 09:39:20 +00:00
<span class="component-desc">The latest releases are the focus of this provider, no backlog searching</span>
2014-11-21 18:40:00 +00:00
</div>
#end if
</div>
#end for
2015-07-13 09:39:20 +00:00
##
2014-11-21 18:40:00 +00:00
2015-07-13 09:39:20 +00:00
##
2014-11-21 18:40:00 +00:00
#for $ curTorrentProvider in [ $ curProvider for $ curProvider in $ sickbeard . providers . sortedProviderList ( ) if $ curProvider . providerType == $ GenericProvider . TORRENT ] :
2015-07-13 09:39:20 +00:00
<div class="providerDiv" id=" ${ curTorrentProvider . get_id ( ) } Div">
2015-09-18 00:06:34 +00:00
#if callable ( getattr ( curTorrentProvider , ' ui_string ' , None ) )
#set $ field_name = curTorrentProvider . get_id ( ) + ' _tip '
#set $ tip_text = curTorrentProvider . ui_string ( $ field_name )
#if $ tip_text
<div class="field-pair">
<span class="component-desc" style="margin:0;width:100%">
<div class="clear-left"><p class="grey-text"><span class="red-text">Important! ${ curTorrentProvider . name } </span> $ tip_text </p></div>
</span>
</div>
#end if
#end if
2014-11-21 18:40:00 +00:00
#if $ hasattr ( $ curTorrentProvider , ' api_key ' ) :
<div class="field-pair">
2015-07-13 09:39:20 +00:00
<label for=" ${ curTorrentProvider . get_id ( ) } _api_key">
2014-11-21 18:40:00 +00:00
<span class="component-title">Api key:</span>
<span class="component-desc">
2015-07-13 09:39:20 +00:00
<input type="text" name=" ${ curTorrentProvider . get_id ( ) } _api_key" id=" ${ curTorrentProvider . get_id ( ) } _api_key" value="<%= starify(curTorrentProvider.api_key) %>" class="form-control input-sm input350" />
2014-11-21 18:40:00 +00:00
</span>
</label>
</div>
#end if
#if $ hasattr ( $ curTorrentProvider , ' digest ' ) :
<div class="field-pair">
2015-07-13 09:39:20 +00:00
<label for=" ${ curTorrentProvider . get_id ( ) } _digest">
2015-09-16 23:52:18 +00:00
<span class="component-title">Cookies:</span>
2014-11-21 18:40:00 +00:00
<span class="component-desc">
2015-09-16 23:52:18 +00:00
#set $ field_name = curTorrentProvider . get_id ( ) + ' _digest '
<input type="text" name=" $ field_name " id=" $ field_name " value="<%= starify(curTorrentProvider.digest) %>" class="form-control input-sm input350" />
2015-09-18 00:06:34 +00:00
#if callable ( getattr ( curTorrentProvider , ' ui_string ' , None ) )
2015-09-16 23:52:18 +00:00
<div class="clear-left"><p> ${ curTorrentProvider . ui_string ( $ field_name ) } </p></div>
#end if
2014-11-21 18:40:00 +00:00
</span>
</label>
</div>
#end if
#if $ hasattr ( $ curTorrentProvider , ' hash ' ) :
<div class="field-pair">
2015-07-13 09:39:20 +00:00
<label for=" ${ curTorrentProvider . get_id ( ) } _hash">
2014-11-21 18:40:00 +00:00
<span class="component-title">Hash:</span>
<span class="component-desc">
2015-07-13 09:39:20 +00:00
<input type="text" name=" ${ curTorrentProvider . get_id ( ) } _hash" id=" ${ curTorrentProvider . get_id ( ) } _hash" value=" $ curTorrentProvider . hash " class="form-control input-sm input350" />
2014-11-21 18:40:00 +00:00
</span>
</label>
</div>
#end if
#if $ hasattr ( $ curTorrentProvider , ' username ' ) :
<div class="field-pair">
2015-07-13 09:39:20 +00:00
<label for=" ${ curTorrentProvider . get_id ( ) } _username">
2014-11-21 18:40:00 +00:00
<span class="component-title">Username:</span>
<span class="component-desc">
2015-07-13 09:39:20 +00:00
<input type="text" name=" ${ curTorrentProvider . get_id ( ) } _username" id=" ${ curTorrentProvider . get_id ( ) } _username" value=" $ curTorrentProvider . username " class="form-control input-sm input350" />
2014-11-21 18:40:00 +00:00
</span>
</label>
</div>
#end if
#if $ hasattr ( $ curTorrentProvider , ' password ' ) :
<div class="field-pair">
2015-07-13 09:39:20 +00:00
<label for=" ${ curTorrentProvider . get_id ( ) } _password">
2014-11-21 18:40:00 +00:00
<span class="component-title">Password:</span>
<span class="component-desc">
2015-09-18 00:06:34 +00:00
<input type="password" name=" ${ curTorrentProvider . get_id ( ) } _password" id=" ${ curTorrentProvider . get_id ( ) } _password" value=" #echo $ curTorrentProvider . password and ' * ' * len ( $ curTorrentProvider . password ) or ' ' # " class="form-control input-sm input350" />
2014-11-21 18:40:00 +00:00
</span>
</label>
</div>
#end if
#if $ hasattr ( $ curTorrentProvider , ' passkey ' ) :
<div class="field-pair">
2015-07-13 09:39:20 +00:00
<label for=" ${ curTorrentProvider . get_id ( ) } _passkey">
2014-11-21 18:40:00 +00:00
<span class="component-title">Passkey:</span>
<span class="component-desc">
2015-07-13 09:39:20 +00:00
<input type="text" name=" ${ curTorrentProvider . get_id ( ) } _passkey" id=" ${ curTorrentProvider . get_id ( ) } _passkey" value="<%= starify(curTorrentProvider.passkey) %>" class="form-control input-sm input350" />
2014-11-21 18:40:00 +00:00
</span>
</label>
</div>
#end if
2015-07-13 09:39:20 +00:00
#if $ hasattr ( $ curTorrentProvider , ' _seed_ratio ' ) and ' blackhole ' != $ sickbeard . TORRENT_METHOD :
2015-09-12 17:06:54 +00:00
#set $ torrent_method_text = { ' utorrent ' : ' uTorrent ' , ' transmission ' : ' Transmission ' , ' deluge ' : ' Deluge ' , ' download_station ' : ' Synology DS ' , ' rtorrent ' : ' rTorrent ' }
2014-11-21 18:40:00 +00:00
<div class="field-pair">
2015-07-13 09:39:20 +00:00
<label for=" ${ curTorrentProvider . get_id ( ) } _ratio">
<span class="component-title" id=" ${ curTorrentProvider . get_id ( ) } _ratio_desc">Seed until ratio (the goal)</span>
2014-11-21 18:40:00 +00:00
<span class="component-desc">
2015-09-12 17:06:54 +00:00
<input type="number" name=" ${ curTorrentProvider . get_id ( ) } _ratio" id=" ${ curTorrentProvider . get_id ( ) } _ratio" value=" $ curTorrentProvider . _seed_ratio " class="form-control input-sm input75" />
<p>this ratio is requested of each item sent to $ torrent_method_text [ $ sickbeard . TORRENT_METHOD ]</p>
2015-09-18 00:06:34 +00:00
<div class="clear-left"><p>( #if ' Transmission ' in $ torrent_method_text [ $ sickbeard . TORRENT_METHOD ] # set -1 to seed forever, or #end if# leave blank for the $ torrent_method_text [ $ sickbeard . TORRENT_METHOD ] setting)</p></div>
2015-09-12 17:06:54 +00:00
</span>
</label>
</div>
#end if
#if $ hasattr ( $ curTorrentProvider , ' seed_time ' ) and ' utorrent ' == $ sickbeard . TORRENT_METHOD :
#set $ torrent_method_text = { ' utorrent ' : ' uTorrent ' }
#set $ use_default = ' to use the %s min <a href= " %s /config/search/ # core-component-group3">torrent search setting minumum default</a>' % ( $ sickbeard . TORRENT_SEED_TIME , $ sbRoot ) if $ sickbeard . TORRENT_SEED_TIME else 'for the %s setting' % $ torrent_method_text [ $ sickbeard . TORRENT_METHOD ]
<div class="field-pair">
<label for=" ${ curTorrentProvider . get_id ( ) } _seed_time">
<span class="component-title" id=" ${ curTorrentProvider . get_id ( ) } _seed_time_desc">Seed time (provider default)</span>
<span class="component-desc">
<input type="number" name=" ${ curTorrentProvider . get_id ( ) } _seed_time" id=" ${ curTorrentProvider . get_id ( ) } _seed_time" value=" $ curTorrentProvider . seed_time " class="form-control input-sm input75" />
<p>set 1 or more minimum minutes for each item sent to $ torrent_method_text [ $ sickbeard . TORRENT_METHOD ]</p>
<div class="clear-left"><p>(leave blank $ use_default )</p></div>
2014-11-21 18:40:00 +00:00
</span>
</label>
</div>
#end if
#if $ hasattr ( $ curTorrentProvider , ' minseed ' ) :
<div class="field-pair">
2015-07-13 09:39:20 +00:00
<label for=" ${ curTorrentProvider . get_id ( ) } _minseed">
<span class="component-title" id=" ${ curTorrentProvider . get_id ( ) } _minseed_desc">Minimum seeders</span>
2014-11-21 18:40:00 +00:00
<span class="component-desc">
2015-07-13 09:39:20 +00:00
<input type="number" name=" ${ curTorrentProvider . get_id ( ) } _minseed" id=" ${ curTorrentProvider . get_id ( ) } _minseed" value=" $ curTorrentProvider . minseed " class="form-control input-sm input75" />
<p>a release must have to be snatch worthy</p>
2014-11-21 18:40:00 +00:00
</span>
</label>
</div>
#end if
#if $ hasattr ( $ curTorrentProvider , ' minleech ' ) :
<div class="field-pair">
2015-07-13 09:39:20 +00:00
<label for=" ${ curTorrentProvider . get_id ( ) } _minleech">
<span class="component-title" id=" ${ curTorrentProvider . get_id ( ) } _minleech_desc">Minimum leechers</span>
2014-11-21 18:40:00 +00:00
<span class="component-desc">
2015-07-13 09:39:20 +00:00
<input type="number" name=" ${ curTorrentProvider . get_id ( ) } _minleech" id=" ${ curTorrentProvider . get_id ( ) } _minleech" value=" $ curTorrentProvider . minleech " class="form-control input-sm input75" />
<p>a release must have to be snatch worthy</p>
2014-11-21 18:40:00 +00:00
</span>
</label>
</div>
#end if
#if $ hasattr ( $ curTorrentProvider , ' proxy ' ) :
<div class="field-pair">
2015-07-13 09:39:20 +00:00
<label for=" ${ curTorrentProvider . get_id ( ) } _proxy">
2014-11-21 18:40:00 +00:00
<span class="component-title">Access provider via proxy</span>
<span class="component-desc">
2015-07-13 09:39:20 +00:00
<input type="checkbox" class="enabler" name=" ${ curTorrentProvider . get_id ( ) } _proxy" id=" ${ curTorrentProvider . get_id ( ) } _proxy" <%= html_checked if curTorrentProvider.proxy.enabled else '' %>/>
2014-11-21 18:40:00 +00:00
<p>to bypass country blocking mechanisms</p>
</span>
</label>
</div>
#if $ hasattr ( $ curTorrentProvider . proxy , ' url ' ) :
2015-07-13 09:39:20 +00:00
<div class="field-pair content_ ${ curTorrentProvider . get_id ( ) } _proxy" id="content_ ${ curTorrentProvider . get_id ( ) } _proxy">
<label for=" ${ curTorrentProvider . get_id ( ) } _proxy_url">
2014-11-21 18:40:00 +00:00
<span class="component-title">Proxy URL:</span>
<span class="component-desc">
2015-07-13 09:39:20 +00:00
<select name=" ${ curTorrentProvider . get_id ( ) } _proxy_url" id=" ${ curTorrentProvider . get_id ( ) } _proxy_url" class="form-control input-sm">
2014-11-21 18:40:00 +00:00
#for $ i in $ curTorrentProvider . proxy . urls . keys ( ) :
<option value=" $ curTorrentProvider . proxy . urls [ $i]" <%= html_selected if curTorrentProvider.proxy.url == curTorrentProvider.proxy.urls[i] else '' %>> $i</option>
#end for
</select>
</span>
</label>
</div>
#end if
#end if
#if $ hasattr ( $ curTorrentProvider , ' confirmed ' ) :
<div class="field-pair">
2015-07-13 09:39:20 +00:00
<label for=" ${ curTorrentProvider . get_id ( ) } _confirmed">
2014-11-21 18:40:00 +00:00
<span class="component-title">Confirmed download</span>
<span class="component-desc">
2015-07-13 09:39:20 +00:00
<input type="checkbox" name=" ${ curTorrentProvider . get_id ( ) } _confirmed" id=" ${ curTorrentProvider . get_id ( ) } _confirmed" <%= html_checked if curTorrentProvider.confirmed else '' %>/>
2014-11-21 18:40:00 +00:00
<p>only download torrents from trusted or verified uploaders ?</p>
</span>
</label>
</div>
#end if
#if $ hasattr ( $ curTorrentProvider , ' freeleech ' ) :
<div class="field-pair">
2015-07-13 09:39:20 +00:00
<label for=" ${ curTorrentProvider . get_id ( ) } _freeleech">
2014-11-21 18:40:00 +00:00
<span class="component-title">Freeleech</span>
<span class="component-desc">
2015-07-13 09:39:20 +00:00
<input type="checkbox" name=" ${ curTorrentProvider . get_id ( ) } _freeleech" id=" ${ curTorrentProvider . get_id ( ) } _freeleech" <%= html_checked if curTorrentProvider.freeleech else '' %>/>
2014-11-21 18:40:00 +00:00
<p>only download <b>[FreeLeech]</b> torrents.</p>
</span>
</label>
</div>
#end if
2015-09-18 00:06:34 +00:00
#if $ hasattr ( $ curTorrentProvider , ' reject_m2ts ' ) :
<div class="field-pair">
<label for=" ${ curTorrentProvider . get_id ( ) } _reject_m2ts">
<span class="component-title">Reject Blu-ray M2TS releases</span>
<span class="component-desc">
<input type="checkbox" name=" ${ curTorrentProvider . get_id ( ) } _reject_m2ts" id=" ${ curTorrentProvider . get_id ( ) } _reject_m2ts" <%= html_checked if curTorrentProvider.reject_m2ts else '' %>/>
<p>enable to ignore Blu-ray MPEG-2 Transport Stream container releases</p>
</span>
</label>
</div>
#end if
2015-07-13 09:39:20 +00:00
#if $ hasattr ( $ curTorrentProvider , ' enable_recentsearch ' ) and $ curTorrentProvider . supportsBacklog :
2014-11-21 18:40:00 +00:00
<div class="field-pair">
2015-07-13 09:39:20 +00:00
<label for=" ${ curTorrentProvider . get_id ( ) } _enable_recentsearch">
2014-12-22 18:30:53 +00:00
<span class="component-title">Enable recent searches</span>
2014-11-21 18:40:00 +00:00
<span class="component-desc">
2015-07-13 09:39:20 +00:00
<input type="checkbox" name=" ${ curTorrentProvider . get_id ( ) } _enable_recentsearch" id=" ${ curTorrentProvider . get_id ( ) } _enable_recentsearch" <%= html_checked if curTorrentProvider.enable_recentsearch else '' %>/>
2014-12-22 18:30:53 +00:00
<p>enable provider to perform recent searches.</p>
2014-11-21 18:40:00 +00:00
</span>
</label>
</div>
#end if
2015-07-13 09:39:20 +00:00
#if $ hasattr ( $ curTorrentProvider , ' enable_backlog ' ) and $ curTorrentProvider . supportsBacklog :
2014-11-21 18:40:00 +00:00
<div class="field-pair">
2015-07-13 09:39:20 +00:00
<label for=" ${ curTorrentProvider . get_id ( ) } _enable_backlog">
2014-11-21 18:40:00 +00:00
<span class="component-title">Enable backlog searches</span>
<span class="component-desc">
2015-07-13 09:39:20 +00:00
<input type="checkbox" name=" ${ curTorrentProvider . get_id ( ) } _enable_backlog" id=" ${ curTorrentProvider . get_id ( ) } _enable_backlog" <%= html_checked if curTorrentProvider.enable_backlog else '' %>/>
2014-11-21 18:40:00 +00:00
<p>enable provider to perform backlog searches.</p>
</span>
</label>
</div>
#end if
2015-07-13 09:39:20 +00:00
#if $ hasattr ( $ curTorrentProvider , ' search_mode ' ) and $ curTorrentProvider . supportsBacklog :
2014-11-21 18:40:00 +00:00
<div class="field-pair">
2015-07-13 09:39:20 +00:00
<span class="component-title">Season search mode</span>
<span class="component-desc">
<label class="space-right">
<input type="radio" name=" ${ curTorrentProvider . get_id ( ) } _search_mode" id=" ${ curTorrentProvider . get_id ( ) } _search_mode_sponly" value="sponly" <%= html_checked if 'sponly' == curTorrentProvider.search_mode else '' %>/>season packs only
</label>
<label>
<input type="radio" name=" ${ curTorrentProvider . get_id ( ) } _search_mode" id=" ${ curTorrentProvider . get_id ( ) } _search_mode_eponly" value="eponly" <%= html_checked if 'eponly' == curTorrentProvider.search_mode else '' %>/>episodes only
</label>
<p>when searching for complete seasons, search for packs or collect single episodes</p>
</span>
2014-11-21 18:40:00 +00:00
</div>
#end if
2015-07-13 09:39:20 +00:00
#if $ hasattr ( $ curTorrentProvider , ' search_fallback ' ) and $ curTorrentProvider . supportsBacklog :
2014-11-21 18:40:00 +00:00
<div class="field-pair">
2015-07-13 09:39:20 +00:00
<label for=" ${ curTorrentProvider . get_id ( ) } _search_fallback">
<span class="component-title">Season search fallback</span>
2014-11-21 18:40:00 +00:00
<span class="component-desc">
2015-07-13 09:39:20 +00:00
<input type="checkbox" name=" ${ curTorrentProvider . get_id ( ) } _search_fallback" id=" ${ curTorrentProvider . get_id ( ) } _search_fallback" <%= html_checked if curTorrentProvider.search_fallback else '' %>/>
<p>run the alternate season search mode when a complete season is not found</p>
2014-11-21 18:40:00 +00:00
</span>
</label>
</div>
#end if
</div>
#end for
<!-- end div for editing providers -->
#if $ provider_config_list
<input type="submit" class="btn config_submitter" value="Save Changes" /><br/>
#end if
</fieldset>
</div><!-- /component-group2 //-->
#if $ sickbeard . USE_NZBS
<div id="core-component-group3" class="component-group">
<div class="component-group-desc">
<h3>Configure Custom<br />Newznab Providers</h3>
<p>Add and setup or remove custom newznab providers.</p>
</div>
<fieldset class="component-group-list">
<div class="field-pair">
<label for="newznab_string">
<span class="component-title">Select provider:</span>
<span class="component-desc">
<input type="hidden" name="newznab_string" id="newznab_string" />
<select id="editANewznabProvider" class="form-control input-sm">
<option value="addNewznab">-- add new provider --</option>
</select>
</span>
</label>
</div>
<div class="newznabProviderDiv" id="addNewznab">
<div class="field-pair">
<label for="newznab_name">
<span class="component-title">Provider name</span>
<span class="component-desc">
<input type="text" id="newznab_name" class="form-control input-sm input200" />
</span>
</label>
</div>
<div class="field-pair">
<label for="newznab_url">
<span class="component-title">Site URL</span>
<span class="component-desc">
<input type="text" id="newznab_url" class="form-control input-sm input350" />
</span>
</label>
</div>
<div class="field-pair">
<label for="newznab_key">
<span class="component-title">API key</span>
<span class="component-desc">
<input type="text" id="newznab_key" class="form-control input-sm input350" />
</span>
<span class="component-desc">
<div class="clear-left"><p>note: enter 0 (zero) if not required</p></div>
</span>
</label>
</div>
<div class="field-pair">
<label>
<span class="component-title">Search categories</span>
<span class="component-desc">
<select id="newznab_cap" multiple="multiple" style="min-width:10em;" ></select>
<select id="newznab_cat" multiple="multiple" style="min-width:10em;" ></select>
<div class="clear-left">
<p>select newznab categories to search on the left then "Update Categories"<br />
<b>remember</b> to "Save Changes"!</p>
</div>
<div class="clear-left"><input class="btn" type="button" class="newznab_cat_update" id="newznab_cat_update" value="Update Categories" /></div>
</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">
<div class="component-group-desc">
<h3>Configure Custom Torrent Providers</h3>
<p>Add or remove custom RSS providers.</p>
</div>
<fieldset class="component-group-list">
<div class="field-pair">
<label for="torrentrss_string">
<span class="component-title">Select provider</span>
<span class="component-desc">
<input type="hidden" name="torrentrss_string" id="torrentrss_string" />
<select id="editATorrentRssProvider" class="form-control input-sm">
<option value="addTorrentRss">-- add new provider --</option>
</select>
</span>
</label>
</div>
<div class="torrentRssProviderDiv" id="addTorrentRss">
<div class="field-pair">
<label for="torrentrss_name">
<span class="component-title">Provider name</span>
<span class="component-desc">
<input type="text" id="torrentrss_name" class="form-control input-sm input200" />
</span>
</label>
</div>
<div class="field-pair">
<label for="torrentrss_url">
<span class="component-title">RSS URL</span>
<span class="component-desc">
<input type="text" id="torrentrss_url" class="form-control input-sm input350" />
</span>
</label>
</div>
<div class="field-pair">
<label for="torrentrss_cookies">
<span class="component-title">Cookies:</span>
<span class="component-desc">
<input type="text" id="torrentrss_cookies" class="form-control input-sm input350" />
<p>eg. uid=xx;pass=yy</p>
</span>
</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>
2014-10-21 19:09:01 +00:00
</div>
2014-03-10 05:18:05 +00:00
<script type="text/javascript" charset="utf-8">
<!--
jQuery(' #config - components ' ).tabs();
//-->
</script>
2015-05-07 00:36:40 +00:00
2015-09-18 00:06:34 +00:00
#include $ os . path . join ( $ sickbeard . PROG_DIR , ' gui/slick/interfaces/default/inc_bottom.tmpl ' )