mirror of
https://github.com/SickGear/SickGear.git
synced 2024-12-11 21:53:37 +00:00
d3a7f0ff5e
Add newznab smart logic to avoid missing releases when there are a great many recent releases. Change improve performance by using newznab server advertised capabilities. Change config/providers newznab to display only non-default categories. Change use scene season for wanted segment in backlog if show is scene numbering. Change combine Manage Searches / Backlog Search / Limited and Full to Force. Change consolidate limited and full backlog. Change config / Search / Backlog search frequency to instead spread backlog searches over a number of days. Change migrate minimum used value for search frequency into new minimum 7 for search spread. Change restrict nzb providers to 1 backlog batch run per day. Add to Config/Search/Unaired episodes/Allow episodes that are released early. Add to Config/Search/Unaired episodes/Use specific api requests to search for early episode releases. Add use related ids for newznab searches to increase search efficiency. Add periodic update of related show ids. Change terminology Edit Show/"Post processing" tab name to "Other". Add advanced feature "Related show IDs" to Edit Show/Other used for finding episodes and TV info. Add search info source image links to those that have zero id under Edit Show/Other/"Related show IDs". Add "set master" button to Edit Show/Other/"Related show IDs" for info source that can be changed. Change terminology displayShow "Indexers" to "Links" to cover internal and web links. Change add related show info sources on displayShow page. Change don't display "temporarily" defunct TVRage image link on displayShow pages unless it is master info source. Change if a defunct info source is the master of a show then present a link on displayShow to edit related show IDs. Change simplify the next backlog search run time display in the page footer. Change try ssl when fetching data thetvdb, imdb, trakt, scene exception. Change improve reliability to Trakt notifier by using show related id support. Change improve config/providers newznab categories layout. Change show loaded log message at start up and include info source. Change if episode has no airdate then set status to unaired (was skipped). Technical Change move scene_exceptions table from cache.db to sickbeard.db. Add related ids to show obj. Add use of mapped indexer ids for newznab. Add indexer to sql in wanted_eps. Add aired in (scene) season for wanted episodes. Add need_anime, need_sports, need_sd, need_hd, need_uhd to wanted episodes and added as parameter to update_providers. Add fix for lib lockfile/mkdirlockfile. Add set master TV info source logic. Change harden ui input validation. Add per action dialog confirmation. Change to reload page under more events. Change implement "Mark all added episodes Wanted to search for releases" when setting new info source.
764 lines
34 KiB
Cheetah
764 lines
34 KiB
Cheetah
#import sickbeard
|
|
#from sickbeard.clients import get_client_instance
|
|
#from sickbeard.providers.generic import GenericProvider
|
|
#from sickbeard.providers import thepiratebay
|
|
#from sickbeard.helpers import anon_url, starify
|
|
##
|
|
#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?v=$sbPID"></script>
|
|
<script type="text/javascript" src="$sbRoot/js/config.js?v=$sbPID"></script>
|
|
|
|
#set $methods_notused = []
|
|
#if not $sickbeard.USE_NZBS
|
|
$methods_notused.append('Newznab')
|
|
#end if
|
|
#if not $sickbeard.USE_TORRENTS
|
|
$methods_notused.append('Torrent')
|
|
#end if
|
|
|
|
#if $sickbeard.USE_NZBS or $sickbeard.USE_TORRENTS
|
|
<script type="text/javascript" charset="utf-8">
|
|
<!--
|
|
\$(document).ready(function(){
|
|
|
|
#if $sickbeard.USE_NZBS
|
|
|
|
var show_nzb_providers = <%= 'true' if sickbeard.USE_NZBS else 'false' %>;
|
|
|
|
#for $cur_newznab_provider in $sickbeard.newznabProviderList:
|
|
|
|
\$(this).addProvider('$cur_newznab_provider.get_id()', '$cur_newznab_provider.name', '$cur_newznab_provider.url', '<%= starify(cur_newznab_provider.key) %>', '$cur_newznab_provider.cat_ids', $int($cur_newznab_provider.default), show_nzb_providers);
|
|
|
|
#end for
|
|
|
|
#end if
|
|
|
|
#if $sickbeard.USE_TORRENTS
|
|
|
|
#for $cur_torrent_rss_provider in $sickbeard.torrentRssProviderList:
|
|
|
|
\$(this).addTorrentRssProvider('$cur_torrent_rss_provider.get_id()', '$cur_torrent_rss_provider.name', '$cur_torrent_rss_provider.url', '<%= starify(cur_torrent_rss_provider.cookies) %>');
|
|
|
|
#end for
|
|
|
|
#end if
|
|
});
|
|
//-->
|
|
</script>
|
|
#end if
|
|
|
|
##
|
|
#set $html_selected = ' selected="selected"'
|
|
#set $html_checked = 'checked="checked" '
|
|
<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, two are recommended.</p>
|
|
|
|
#if $methods_notused
|
|
<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>
|
|
#else
|
|
<br/>
|
|
#end if
|
|
</div>
|
|
|
|
|
|
<ul id="provider_order_list" class="provider_order_panel">
|
|
#for $cur_provider in [$x for $x in $sickbeard.providers.sortedProviderList()
|
|
if $x.providerType == $GenericProvider.NZB and $sickbeard.USE_NZBS or
|
|
$x.providerType == $GenericProvider.TORRENT and $sickbeard.USE_TORRENTS]
|
|
#set $cur_name = $cur_provider.get_id()
|
|
#set $cur_url = $cur_provider.url
|
|
#set $tip = ($cur_provider.name, 'Site Down')[not $cur_url]
|
|
#set $state = ('', ' <span class="red-text">(Site Down?)</span>')[not $cur_url]
|
|
<li class="ui-state-default" id="$cur_name">
|
|
<input type="checkbox" id="enable_$cur_name" class="provider_enabler" <%= html_checked if cur_provider.is_enabled() else '' %>/>
|
|
<a href="<%= anon_url(cur_url) %>" class="imgLink" rel="noreferrer" onclick="window.open(this.href,'_blank');return false;"><img src="$sbRoot/images/providers/$cur_provider.image_name()" alt="$tip" title="$tip" width="16" height="16" style="vertical-align:middle" /></a>
|
|
<span style="vertical-align:middle">$cur_provider.name$state</span>
|
|
#if $cur_provider.is_public_access()#
|
|
<span style="font-size:10px;vertical-align:top;font-weight:normal">(PA)</span>
|
|
#end if#
|
|
#if not $cur_provider.supports_backlog#*#end if#
|
|
<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">
|
|
<span style="float:left;font-size:10px;vertical-align:top;font-weight:normal">(PA)</span><p class="note">Public access, no account required</p>
|
|
<h4 class="note"></h4><p class="note">Searches current and past releases</p>
|
|
<h4 class="note">*</h4><p class="note">Searches current but not past releases</p>
|
|
## #if $sickbeard.USE_TORRENTS
|
|
## <h4 class="note">**</h4><p class="note">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>
|
|
|
|
<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()])%>"/>
|
|
<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 $cur_provider in [$x for $x in $sickbeard.providers.sortedProviderList()
|
|
if $x.providerType == $GenericProvider.NZB and $sickbeard.USE_NZBS or
|
|
$x.providerType == $GenericProvider.TORRENT and $sickbeard.USE_TORRENTS]
|
|
#if $cur_provider.is_enabled()
|
|
$provider_config_list_enabled.append($cur_provider)
|
|
#else
|
|
$provider_config_list.append($cur_provider)
|
|
#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:
|
|
<option value="$cur_provider.get_id()">$cur_provider.name</option>
|
|
#end for
|
|
</optgroup>
|
|
#end if
|
|
#if $provider_config_list
|
|
<optgroup label="Not Enabled...">
|
|
#for $cur_provider in $provider_config_list
|
|
<option value="$cur_provider.get_id()">$cur_provider.name</option>
|
|
#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 $cur_newznab_provider in [$cur_provider for $cur_provider in $sickbeard.newznabProviderList]
|
|
<div class="providerDiv" id="${cur_newznab_provider.get_id()}Div">
|
|
#if $cur_newznab_provider.default and $cur_newznab_provider.needs_auth
|
|
<div class="field-pair">
|
|
<label for="${cur_newznab_provider.get_id()}_url">
|
|
<span class="component-title">URL</span>
|
|
<span class="component-desc">
|
|
<input type="text" id="${cur_newznab_provider.get_id()}_url" value="$cur_newznab_provider.url" class="form-control input-sm input350" disabled/>
|
|
</span>
|
|
</label>
|
|
</div>
|
|
|
|
<div class="field-pair">
|
|
<label for="${cur_newznab_provider.get_id()}_hash">
|
|
<span class="component-title">API key</span>
|
|
<span class="component-desc">
|
|
<input type="text" id="${cur_newznab_provider.get_id()}_hash" value="<%= starify(cur_newznab_provider.key) %>" newznab_name="${cur_newznab_provider.get_id()}_hash" class="newznab_key form-control input-sm input350" />
|
|
<div class="clear-left"><p>get API key from provider website</p></div>
|
|
</span>
|
|
</label>
|
|
</div>
|
|
#end if
|
|
#if $hasattr($cur_newznab_provider, 'enable_recentsearch') and $cur_newznab_provider.supports_backlog:
|
|
<div class="field-pair">
|
|
<label for="${cur_newznab_provider.get_id()}_enable_recentsearch">
|
|
<span class="component-title">Enable recent searches</span>
|
|
<span class="component-desc">
|
|
<input type="checkbox" name="${cur_newznab_provider.get_id()}_enable_recentsearch" id="${cur_newznab_provider.get_id()}_enable_recentsearch" <%= html_checked if cur_newznab_provider.enable_recentsearch else '' %>/>
|
|
<p>perform recent searches at provider</p>
|
|
</span>
|
|
</label>
|
|
</div>
|
|
#end if
|
|
#if $hasattr($cur_newznab_provider, 'enable_backlog') and $cur_newznab_provider.supports_backlog:
|
|
<div class="field-pair">
|
|
<label for="${cur_newznab_provider.get_id()}_enable_backlog">
|
|
<span class="component-title">Enable backlog searches</span>
|
|
<span class="component-desc">
|
|
<input type="checkbox" name="${cur_newznab_provider.get_id()}_enable_backlog" id="${cur_newznab_provider.get_id()}_enable_backlog" <%= html_checked if cur_newznab_provider.enable_backlog else '' %>/>
|
|
<p>perform backlog searches at provider</p>
|
|
</span>
|
|
</label>
|
|
</div>
|
|
#end if
|
|
#if $hasattr($cur_newznab_provider, 'search_mode') and $cur_newznab_provider.supports_backlog:
|
|
<div class="field-pair">
|
|
<span class="component-title">Episode search mode</span>
|
|
<span class="component-desc">
|
|
<label class="space-right">
|
|
<input type="radio" name="${cur_newznab_provider.get_id()}_search_mode" id="${cur_newznab_provider.get_id()}_search_mode_eponly" value="eponly" <%= html_checked if 'eponly' == cur_newznab_provider.search_mode else '' %>/>episodes only (normal use)
|
|
</label>
|
|
<label>
|
|
<input type="radio" name="${cur_newznab_provider.get_id()}_search_mode" id="${cur_newznab_provider.get_id()}_search_mode_sponly" value="sponly" <%= html_checked if 'sponly' == cur_newznab_provider.search_mode else '' %>/>season packs only
|
|
</label>
|
|
<p>when searching for episodes, collect single episodes or search for packs</p>
|
|
</span>
|
|
</div>
|
|
#end if
|
|
#if $hasattr($cur_newznab_provider, 'search_fallback') and $cur_newznab_provider.supports_backlog:
|
|
<div class="field-pair">
|
|
<label for="${cur_newznab_provider.get_id()}_search_fallback">
|
|
<span class="component-title">Episode search fallback</span>
|
|
<span class="component-desc">
|
|
<input type="checkbox" name="${cur_newznab_provider.get_id()}_search_fallback" id="${cur_newznab_provider.get_id()}_search_fallback" <%= html_checked if cur_newznab_provider.search_fallback else '' %>/>
|
|
<p>use the alternate episode search mode if no match is found -- warning; may result in a heavy block hit -- best use: manually collect a season, disable after.</p>
|
|
</span>
|
|
</label>
|
|
</div>
|
|
#end if
|
|
</div>
|
|
#end for
|
|
##
|
|
|
|
##
|
|
#for $cur_nzb_provider in [$cur_provider for $cur_provider in $sickbeard.providers.sortedProviderList()
|
|
if $cur_provider.providerType == $GenericProvider.NZB and $cur_provider not in $sickbeard.newznabProviderList]:
|
|
<div class="providerDiv" id="${cur_nzb_provider.get_id()}Div">
|
|
#if $hasattr($cur_nzb_provider, 'username'):
|
|
<div class="field-pair">
|
|
<label for="${cur_nzb_provider.get_id()}_username">
|
|
<span class="component-title">Username</span>
|
|
<span class="component-desc">
|
|
<input type="text" name="${cur_nzb_provider.get_id()}_username" value="$cur_nzb_provider.username" class="form-control input-sm input350" />
|
|
</span>
|
|
</label>
|
|
</div>
|
|
#end if
|
|
#if $hasattr($cur_nzb_provider, 'api_key'):
|
|
<div class="field-pair">
|
|
<label for="${cur_nzb_provider.get_id()}_api_key">
|
|
<span class="component-title">API key</span>
|
|
<span class="component-desc">
|
|
#set $field_name = cur_nzb_provider.get_id() + '_api_key'
|
|
<input type="text" name="$field_name" value="<%= starify(cur_nzb_provider.api_key) %>" class="form-control input-sm input350" />
|
|
#if callable(getattr(cur_nzb_provider, 'ui_string', None))
|
|
<div class="clear-left"><p>${cur_nzb_provider.ui_string($field_name)}</p></div>
|
|
#end if
|
|
</span>
|
|
</label>
|
|
</div>
|
|
#end if
|
|
#if $hasattr($cur_nzb_provider, 'enable_recentsearch') and $cur_nzb_provider.supports_backlog:
|
|
<div class="field-pair">
|
|
<label for="${cur_nzb_provider.get_id()}_enable_recentsearch">
|
|
<span class="component-title">Enable recent searches</span>
|
|
<span class="component-desc">
|
|
<input type="checkbox" name="${cur_nzb_provider.get_id()}_enable_recentsearch" id="${cur_nzb_provider.get_id()}_enable_recentsearch" <%= html_checked if cur_nzb_provider.enable_recentsearch else '' %>/>
|
|
<p>enable provider to perform recent searches</p>
|
|
</span>
|
|
</label>
|
|
</div>
|
|
#end if
|
|
#if $hasattr($cur_nzb_provider, 'enable_backlog') and $cur_nzb_provider.supports_backlog:
|
|
<div class="field-pair">
|
|
<label for="${cur_nzb_provider.get_id()}_enable_backlog">
|
|
<span class="component-title">Enable backlog searches</span>
|
|
<span class="component-desc">
|
|
<input type="checkbox" name="${cur_nzb_provider.get_id()}_enable_backlog" id="${cur_nzb_provider.get_id()}_enable_backlog" <%= html_checked if cur_nzb_provider.enable_backlog else '' %>/>
|
|
<p>enable provider to perform backlog searches</p>
|
|
</span>
|
|
</label>
|
|
</div>
|
|
#end if
|
|
#if $hasattr($cur_nzb_provider, 'search_mode') and $cur_nzb_provider.supports_backlog:
|
|
<div class="field-pair">
|
|
<span class="component-title">Episode search mode</span>
|
|
<span class="component-desc">
|
|
<label class="space-right">
|
|
<input type="radio" name="${cur_nzb_provider.get_id()}_search_mode" id="${cur_nzb_provider.get_id()}_search_mode_eponly" value="eponly" <%= html_checked if 'eponly' == cur_nzb_provider.search_mode else '' %>/>episodes only (normal use)
|
|
</label>
|
|
<label>
|
|
<input type="radio" name="${cur_nzb_provider.get_id()}_search_mode" id="${cur_nzb_provider.get_id()}_search_mode_sponly" value="sponly" <%= html_checked if 'sponly' == cur_nzb_provider.search_mode else '' %>/>season packs only
|
|
</label>
|
|
<p>when searching for episodes, collect single episodes or search for packs</p>
|
|
</span>
|
|
</div>
|
|
#end if
|
|
#if $hasattr($cur_nzb_provider, 'search_fallback') and $cur_nzb_provider.supports_backlog:
|
|
<div class="field-pair">
|
|
<label for="${cur_nzb_provider.get_id()}_search_fallback">
|
|
<span class="component-title">Episode search fallback</span>
|
|
<span class="component-desc">
|
|
<input type="checkbox" name="${cur_nzb_provider.get_id()}_search_fallback" id="${cur_nzb_provider.get_id()}_search_fallback" <%= html_checked if cur_nzb_provider.search_fallback else '' %>/>
|
|
<p>use the alternate episode search mode if no match is found -- warning; may result in a heavy block hit -- best use: manually collect a season, disable after.</p>
|
|
</span>
|
|
</label>
|
|
</div>
|
|
#end if
|
|
#if not $cur_nzb_provider.supports_backlog:
|
|
<div class="field-pair">
|
|
<span class="component-desc">The latest releases are the focus of this provider, no backlog searching</span>
|
|
</div>
|
|
#end if
|
|
</div>
|
|
#end for
|
|
##
|
|
|
|
##
|
|
#for $cur_torrent_provider in $sickbeard.USE_TORRENTS and [$cur_provider for $cur_provider in $sickbeard.providers.sortedProviderList()
|
|
if $cur_provider.providerType == $GenericProvider.TORRENT] or []:
|
|
<div class="providerDiv" id="${cur_torrent_provider.get_id()}Div">
|
|
#if callable(getattr(cur_torrent_provider, 'ui_string', None))
|
|
#set $field_name = cur_torrent_provider.get_id() + '_tip'
|
|
#set $tip_text = cur_torrent_provider.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! ${cur_torrent_provider.name}</span> $tip_text</p></div>
|
|
</span>
|
|
</div>
|
|
#end if
|
|
#end if
|
|
#if $getattr($cur_torrent_provider, 'url_edit', None):
|
|
<div class="field-pair">
|
|
<label for="url_base">
|
|
#set $url_label = callable(getattr(cur_torrent_provider, 'ui_string', None)) and cur_torrent_provider.ui_string(cur_torrent_provider.get_id() + '_site_url') or 'Site URL'
|
|
<span class="component-title">$url_label</span>
|
|
<span class="component-desc">
|
|
#set $field_name = cur_torrent_provider.get_id() + '_url_edit'
|
|
<input type="text" name="$field_name" id="$field_name" value="<%= ', '.join(cur_torrent_provider.url_home) %>" class="form-control input-sm input350" />
|
|
#if callable(getattr(cur_torrent_provider, 'ui_string', None))
|
|
<div class="clear-left"><p>${cur_torrent_provider.ui_string($field_name)}</p></div>
|
|
#end if
|
|
</span>
|
|
</label>
|
|
</div>
|
|
#end if
|
|
#if $hasattr($cur_torrent_provider, 'api_key'):
|
|
<div class="field-pair">
|
|
<label for="${cur_torrent_provider.get_id()}_api_key">
|
|
<span class="component-title">Api key:</span>
|
|
<span class="component-desc">
|
|
<input type="text" name="${cur_torrent_provider.get_id()}_api_key" id="${cur_torrent_provider.get_id()}_api_key" value="<%= starify(cur_torrent_provider.api_key) %>" class="form-control input-sm input350" />
|
|
</span>
|
|
</label>
|
|
</div>
|
|
#end if
|
|
#if $hasattr($cur_torrent_provider, 'digest'):
|
|
#set $field_name = cur_torrent_provider.get_id() + '_digest'
|
|
<div class="field-pair">
|
|
<label for="$field_name">
|
|
<span class="component-title">Cookies:</span>
|
|
<span class="component-desc">
|
|
<input type="text" name="$field_name" id="$field_name" value="<%= starify(cur_torrent_provider.digest) %>" class="form-control input-sm input350" />
|
|
#if callable(getattr(cur_torrent_provider, 'ui_string', None))
|
|
<div class="clear-left"><p>${cur_torrent_provider.ui_string($field_name)}</p></div>
|
|
#end if
|
|
</span>
|
|
</label>
|
|
</div>
|
|
#end if
|
|
#if $hasattr($cur_torrent_provider, 'hash'):
|
|
<div class="field-pair">
|
|
<label for="${cur_torrent_provider.get_id()}_hash">
|
|
<span class="component-title">Hash:</span>
|
|
<span class="component-desc">
|
|
<input type="text" name="${cur_torrent_provider.get_id()}_hash" id="${cur_torrent_provider.get_id()}_hash" value="$cur_torrent_provider.hash" class="form-control input-sm input350" />
|
|
</span>
|
|
</label>
|
|
</div>
|
|
#end if
|
|
#for $user_type in ['username', 'uid']:
|
|
#if $hasattr($cur_torrent_provider, $user_type):
|
|
#set $prov_type = '%s_%s' % ($cur_torrent_provider.get_id(), $user_type)
|
|
#set $user_value = $getattr($cur_torrent_provider, $user_type) or ''
|
|
<div class="field-pair">
|
|
<label for="$prov_type">
|
|
<span class="component-title">$user_type.capitalize():</span>
|
|
<span class="component-desc">
|
|
<input type="text" name="$prov_type" id="$prov_type" value="$user_value" class="form-control input-sm input350" />
|
|
</span>
|
|
</label>
|
|
</div>
|
|
#break
|
|
#end if
|
|
#end for
|
|
#if $hasattr($cur_torrent_provider, 'password'):
|
|
<div class="field-pair">
|
|
<label for="${cur_torrent_provider.get_id()}_password">
|
|
<span class="component-title">Password:</span>
|
|
<span class="component-desc">
|
|
<input type="password" name="${cur_torrent_provider.get_id()}_password" id="${cur_torrent_provider.get_id()}_password" value="#echo $cur_torrent_provider.password and '*' * len($cur_torrent_provider.password) or ''#" class="form-control input-sm input350" />
|
|
</span>
|
|
</label>
|
|
</div>
|
|
#end if
|
|
#if $hasattr($cur_torrent_provider, 'passkey'):
|
|
<div class="field-pair">
|
|
<label for="${cur_torrent_provider.get_id()}_passkey">
|
|
<span class="component-title">Passkey:</span>
|
|
<span class="component-desc">
|
|
<input type="text" name="${cur_torrent_provider.get_id()}_passkey" id="${cur_torrent_provider.get_id()}_passkey" value="<%= starify(cur_torrent_provider.passkey) %>" class="form-control input-sm input350" />
|
|
</span>
|
|
</label>
|
|
</div>
|
|
#end if
|
|
<%
|
|
client = {} if 'blackhole' == sickbeard.TORRENT_METHOD else get_client_instance(sickbeard.TORRENT_METHOD)().__class__.__dict__
|
|
name = '' if not client else get_client_instance(sickbeard.TORRENT_METHOD)().name
|
|
%>
|
|
#if ($hasattr($cur_torrent_provider, '_seed_ratio') and '_set_torrent_ratio' in $client)
|
|
<div class="field-pair">
|
|
<label for="${cur_torrent_provider.get_id()}_ratio">
|
|
<span class="component-title" id="${cur_torrent_provider.get_id()}_ratio_desc">Seed until ratio (the goal)</span>
|
|
<span class="component-desc">
|
|
<input type="number" name="${cur_torrent_provider.get_id()}_ratio" id="${cur_torrent_provider.get_id()}_ratio" value="$cur_torrent_provider._seed_ratio" class="form-control input-sm input75" />
|
|
<p>this ratio is requested of each item sent to $name</p>
|
|
<div class="clear-left"><p>(#if 'transmission' == $sickbeard.TORRENT_METHOD#set -1 to seed forever, or #end if#leave blank for the $name setting)</p></div>
|
|
</span>
|
|
</label>
|
|
</div>
|
|
#end if
|
|
#if ($hasattr($cur_torrent_provider, 'seed_time') and '_set_torrent_seed_time' in $client)
|
|
#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' % $name
|
|
<div class="field-pair">
|
|
<label for="${cur_torrent_provider.get_id()}_seed_time">
|
|
<span class="component-title" id="${cur_torrent_provider.get_id()}_seed_time_desc">Seed time (provider default)</span>
|
|
<span class="component-desc">
|
|
<input type="number" name="${cur_torrent_provider.get_id()}_seed_time" id="${cur_torrent_provider.get_id()}_seed_time" value="$cur_torrent_provider.seed_time" class="form-control input-sm input75" />
|
|
<p>set 1 or more minimum minutes for each item sent to $name</p>
|
|
<div class="clear-left"><p>(leave blank $use_default)</p></div>
|
|
</span>
|
|
</label>
|
|
</div>
|
|
#end if
|
|
#if $hasattr($cur_torrent_provider, 'minseed'):
|
|
<div class="field-pair">
|
|
<label for="${cur_torrent_provider.get_id()}_minseed">
|
|
<span class="component-title" id="${cur_torrent_provider.get_id()}_minseed_desc">Minimum seeders</span>
|
|
<span class="component-desc">
|
|
<input type="number" name="${cur_torrent_provider.get_id()}_minseed" id="${cur_torrent_provider.get_id()}_minseed" value="$cur_torrent_provider.minseed" class="form-control input-sm input75" />
|
|
<p>a release must have to be snatch worthy</p>
|
|
</span>
|
|
</label>
|
|
</div>
|
|
#end if
|
|
#if $hasattr($cur_torrent_provider, 'minleech'):
|
|
<div class="field-pair">
|
|
<label for="${cur_torrent_provider.get_id()}_minleech">
|
|
<span class="component-title" id="${cur_torrent_provider.get_id()}_minleech_desc">Minimum leechers</span>
|
|
<span class="component-desc">
|
|
<input type="number" name="${cur_torrent_provider.get_id()}_minleech" id="${cur_torrent_provider.get_id()}_minleech" value="$cur_torrent_provider.minleech" class="form-control input-sm input75" />
|
|
<p>a release must have to be snatch worthy</p>
|
|
</span>
|
|
</label>
|
|
</div>
|
|
#end if
|
|
#if $hasattr($cur_torrent_provider, 'confirmed'):
|
|
<div class="field-pair">
|
|
<label for="${cur_torrent_provider.get_id()}_confirmed">
|
|
<span class="component-title">Confirmed download</span>
|
|
<span class="component-desc">
|
|
<input type="checkbox" name="${cur_torrent_provider.get_id()}_confirmed" id="${cur_torrent_provider.get_id()}_confirmed" <%= html_checked if cur_torrent_provider.confirmed else '' %>/>
|
|
<p>only download torrents from trusted or verified uploaders ?</p>
|
|
</span>
|
|
</label>
|
|
</div>
|
|
#end if
|
|
#if $hasattr($cur_torrent_provider, 'freeleech'):
|
|
<div class="field-pair">
|
|
<label for="${cur_torrent_provider.get_id()}_freeleech">
|
|
<span class="component-title">Freeleech</span>
|
|
<span class="component-desc">
|
|
<input type="checkbox" name="${cur_torrent_provider.get_id()}_freeleech" id="${cur_torrent_provider.get_id()}_freeleech" <%= html_checked if cur_torrent_provider.freeleech else '' %>/>
|
|
<p>only download <b>[FreeLeech]</b> torrents</p>
|
|
</span>
|
|
</label>
|
|
</div>
|
|
#end if
|
|
#if $hasattr($cur_torrent_provider, 'reject_m2ts'):
|
|
<div class="field-pair">
|
|
<label for="${cur_torrent_provider.get_id()}_reject_m2ts">
|
|
<span class="component-title">Reject Blu-ray M2TS releases</span>
|
|
<span class="component-desc">
|
|
<input type="checkbox" name="${cur_torrent_provider.get_id()}_reject_m2ts" id="${cur_torrent_provider.get_id()}_reject_m2ts" <%= html_checked if cur_torrent_provider.reject_m2ts else '' %>/>
|
|
<p>enable to ignore Blu-ray MPEG-2 Transport Stream container releases</p>
|
|
</span>
|
|
</label>
|
|
</div>
|
|
#end if
|
|
#if $hasattr($cur_torrent_provider, 'enable_recentsearch'):
|
|
<div class="field-pair">
|
|
<label for="${cur_torrent_provider.get_id()}_enable_recentsearch">
|
|
<span class="component-title">Enable recent searches</span>
|
|
<span class="component-desc">
|
|
<input type="checkbox" name="${cur_torrent_provider.get_id()}_enable_recentsearch" id="${cur_torrent_provider.get_id()}_enable_recentsearch" <%= html_checked if cur_torrent_provider.enable_recentsearch else '' %>/>
|
|
<p>enable provider to perform recent searches</p>
|
|
</span>
|
|
</label>
|
|
</div>
|
|
#end if
|
|
#if $hasattr($cur_torrent_provider, 'enable_backlog') and $cur_torrent_provider.supports_backlog:
|
|
<div class="field-pair">
|
|
<label for="${cur_torrent_provider.get_id()}_enable_backlog">
|
|
<span class="component-title">Enable backlog searches</span>
|
|
<span class="component-desc">
|
|
<input type="checkbox" name="${cur_torrent_provider.get_id()}_enable_backlog" id="${cur_torrent_provider.get_id()}_enable_backlog" <%= html_checked if cur_torrent_provider.enable_backlog else '' %>/>
|
|
<p>enable provider to perform backlog searches</p>
|
|
</span>
|
|
</label>
|
|
</div>
|
|
#end if
|
|
#if $hasattr($cur_torrent_provider, 'search_mode') and $cur_torrent_provider.supports_backlog:
|
|
<div class="field-pair">
|
|
<span class="component-title">Episode search mode</span>
|
|
<span class="component-desc">
|
|
<label class="space-right">
|
|
<input type="radio" name="${cur_torrent_provider.get_id()}_search_mode" id="${cur_torrent_provider.get_id()}_search_mode_eponly" value="eponly" <%= html_checked if 'eponly' == cur_torrent_provider.search_mode else '' %>/>episodes only (normal use)
|
|
</label>
|
|
<label>
|
|
<input type="radio" name="${cur_torrent_provider.get_id()}_search_mode" id="${cur_torrent_provider.get_id()}_search_mode_sponly" value="sponly" <%= html_checked if 'sponly' == cur_torrent_provider.search_mode else '' %>/>season packs only
|
|
</label>
|
|
<p>when searching for episodes, collect single episodes or search for packs</p>
|
|
</span>
|
|
</div>
|
|
#end if
|
|
#if $hasattr($cur_torrent_provider, 'search_fallback') and $cur_torrent_provider.supports_backlog:
|
|
<div class="field-pair">
|
|
<label for="${cur_torrent_provider.get_id()}_search_fallback">
|
|
<span class="component-title">Episode search fallback</span>
|
|
<span class="component-desc">
|
|
<input type="checkbox" name="${cur_torrent_provider.get_id()}_search_fallback" id="${cur_torrent_provider.get_id()}_search_fallback" <%= html_checked if cur_torrent_provider.search_fallback else '' %>/>
|
|
<p>use the alternate episode search mode if no match is found -- warning; may result in duplicates or a heavy ratio hit -- best use: manually collect a season, disable after.</p>
|
|
</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">Extra categories to search
|
|
<span style="font-weight:normal">with.. (u)hd, sd, sport, anime</span>
|
|
</span>
|
|
<span class="component-desc">
|
|
<div id="nn-cats">
|
|
<div class="pull-left">
|
|
<select class="pull-left" id="newznab_cap" multiple="multiple" style="min-width:10em;min-height:72px"></select>
|
|
<input class="btn" type="button" class="newznab_cat_update" id="newznab_cat_update" value=">>" style="position:relative;bottom:-15px">
|
|
</div>
|
|
<select id="newznab_cat" multiple="multiple" style="min-width:7em;min-height:72px"></select>
|
|
<div class="clear-left">
|
|
<p>multi-select newznab categories on the left<br />
|
|
then click ">>" and finally "Save Changes"</p>
|
|
</div>
|
|
</div>
|
|
<div id="nn-nocats" class="hide">
|
|
<span>No extra categories found</span>
|
|
</div>
|
|
<div id="nn-loadcats" class="hide">
|
|
<span>Loading categories...</span>
|
|
</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>
|
|
</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')
|