2014-03-10 05:18:05 +00:00
#import sickbeard
2014-05-27 07:44:23 +00:00
#import lib . adba as adba
2014-03-10 05:18:05 +00:00
#from sickbeard import common
#from sickbeard import exceptions
#from sickbeard import scene_exceptions
2016-09-04 20:00:44 +00:00
#from sickbeard . helpers import anon_url
#from sickbeard . indexers . indexer_config import INDEXER_TVDB
2015-02-16 03:17:56 +00:00
#import sickbeard . blackandwhitelist
2015-05-07 00:36:40 +00:00
##
2015-02-16 03:17:56 +00:00
#set global $ title = ' Edit ' + $ show . name
2016-02-19 17:38:38 +00:00
#set global $ header = $ show . name
2015-02-16 03:17:56 +00:00
#set global $ sbPath = ' .. '
#set global $ topmenu = ' home '
2016-02-19 17:38:38 +00:00
#set global $ page_body_attr = ' edit-show '
2015-05-07 00:36:40 +00:00
##
2015-02-16 03:17:56 +00:00
#import os . path
2016-09-04 20:00:44 +00:00
#from urllib import quote_plus
2015-02-16 03:17:56 +00:00
#include $ os . path . join ( $ sickbeard . PROG_DIR , ' gui/slick/interfaces/default/inc_top.tmpl ' )
2014-03-10 05:18:05 +00:00
2015-09-12 07:17:26 +00:00
<script type="text/javascript" src=" $ sbRoot /js/qualityChooser.js?v= $ sbPID "></script>
2015-11-23 11:11:38 +00:00
<script type="text/javascript" src=" $ sbRoot /js/editShow.js?v= $ sbPID "></script>
<script>
2016-02-19 17:38:38 +00:00
var config = {showLang: ' $ show . lang ', showIsAnime: #echo [ ' !1 ' , ' !0 ' ] [ $ show . is_anime ] # }
2014-03-10 05:18:05 +00:00
</script>
2015-02-16 03:17:56 +00:00
#if $ varExists ( ' header ' )
2016-02-19 17:38:38 +00:00
<h1 class="header"><span class="grey-text">Edit</span> $ header </h1>
2015-02-16 03:17:56 +00:00
#else
<h1 class="title"> $ title </h1>
#end if
2015-05-07 00:36:40 +00:00
##
#set $ html_checked = ' checked= " checked " '
#set $ html_disabled = ' disabled= " disabled " '
2016-02-19 17:38:38 +00:00
<div id="config">
<div id="config-content" class="linefix container">
<form action="editShow" method="post" id="editShow" style="width:894px">
2016-09-04 20:00:44 +00:00
<input type="hidden" name="show" id="show" value=" $ show . indexerid ">
<input type="hidden" name="indexer" id="indexer" value=" $ show . indexer ">
2016-02-19 17:38:38 +00:00
<div id="config-components">
<ul>
<li><a href=" #core - component - group1 " >Common</a></li>
<li><a href=" #core - component - group2 " >Search</a></li>
2016-09-04 20:00:44 +00:00
<li><a href=" #core - component - group3 " >Other</a></li>
2016-02-19 17:38:38 +00:00
</ul>
<div id="core-component-group1" class="component-group">
<div class="field-pair">
<label for="paused">
<span class="component-title">Paused</span>
<span class="component-desc">
<input type="checkbox" name="paused" id="paused" #echo ( ' ' , $ html_checked ) [ $ show . paused ] # >
<p> #echo ( ' enable to not ' , ' disable to ' ) [ $ show . paused ] # search or match releases for <b class="boldest grey-text"> $ show . name </b></p>
</span>
</label>
</div>
<div class="field-pair #if $ sickbeard . SHOWLIST_TAGVIEW != ' custom ' # hidden #end if# ">
<label for="tag">
<span class="component-title">Group show under</span>
<span class="component-desc">
<select name="tag" id="tag" class="form-control form-control-inline input-sm">
#for $ tag in $ sickbeard . SHOW_TAGS :
<option value=" $ tag " #if $ tag == $ show . tag then ' selected= " selected " ' else ' ' # > $ tag #echo ( ' ' , ' (default) ' ) [ ' Show List ' == $ tag ] # </option>
#end for
</select>
<span>on the "Show List" page</span>
</span>
</label>
</div>
<div class="field-pair">
<span class="label-container">
<span class="component-title">Alternative show name(s)</span>
<span class="component-desc">
<input type="text" id="SceneName" class="form-control form-control-inline input-sm input200">
<select id="SceneNameSeason" class="form-control form-control-inline input-sm input100" style=" #echo ( ' visibility:hidden ' , ' float:left ' ) [ $ show . anime ] # ">
<option value="-1">Series</option>
#if $ show . anime :
#for $ season in $ seasonResults :
<option value=" $ season [0]">Season $ season [0]</option>
#end for
#end if
</select>
<input class="btn btn-inline" type="button" value="Add" id="addSceneName">
<p style="float:left">e.g. The Show, The Show (2016), The Show (US)</p>
<p class="clear-left note">post-processing or searching may require an alternative if a "Show not found" error is reported</p>
</span>
<span id="SceneException" class="component-desc" style="display:none">
<h4 class="grey-text">Alternative a.k.a scene exceptions list (multi-selectable)</h4>
<select id="exceptions_list" name="exceptions_list" multiple="multiple" class="input350" style="min-height:90px; float:left" >
#for $ cur_exception_season in $ show . exceptions :
#for $ cur_exception in $ show . exceptions [ $ cur_exception_season ] :
<option value=" $ cur_exception_season | $ cur_exception "> #if $ show . is_anime # S #echo ( $ cur_exception_season , ' * ' ) [ $ cur_exception_season == - 1 ] # : #end if# $ cur_exception </option>
#end for
#end for
</select>
<span><p class="note"> #if $ show . is_anime # S* = Any series. #end if# This case insensitive list overrides the original name to process</p></span>
<div>
<input id="removeSceneName" value="Remove" class="btn pull-left" type="button" style="margin-top: 10px;"/>
</div>
</span>
</span>
</div>
<div class="field-pair">
<label for="rls_ignore_words">
<span class="component-title">Ignore result with any word</span>
<span class="component-desc">
<input type="text" name="rls_ignore_words" id="rls_ignore_words" value=" $ show . rls_ignore_words " class="form-control form-control-inline input-sm input350">
<p>e.g. [[regex:]word1, word2, ..., word_n, regex_n]</p>
<p class="note">ignore search result <em class="grey-text">if its title contains any</em> of these comma seperated words or regular expressions</p>
</span>
</label>
</div>
<div class="field-pair">
<label for="rls_require_words">
<span class="component-title">Require at least one word</span>
<span class="component-desc">
<input type="text" name="rls_require_words" id="rls_require_words" value=" $ show . rls_require_words " class="form-control form-control-inline input-sm input350">
<p>e.g. [[regex:]word1, word2, ..., word_n, regex_n]</p>
<p class="note">ignore search result <em class="grey-text">unless its title contains one</em> of these comma seperated words or regular expressions</p>
</span>
</label>
</div>
<div class="field-pair">
2014-03-10 05:18:05 +00:00
#set $ qualities = $ common . Quality . splitQuality ( int ( $ show . quality ) )
#set global $ anyQualities = $ qualities [ 0 ]
#set global $ bestQualities = $ qualities [ 1 ]
2015-02-16 03:17:56 +00:00
#include $ os . path . join ( $ sickbeard . PROG_DIR , ' gui/slick/interfaces/default/inc_qualityChooser.tmpl ' )
2014-03-10 05:18:05 +00:00
2014-05-04 04:07:49 +00:00
#if $ anyQualities + $ bestQualities
2016-02-19 17:38:38 +00:00
<div class="field-pair show-if-quality-custom" style="display:none">
<label for="archive_firstmatch">
<span class="component-title">Upgrade once</span>
<span class="component-desc">
<input type="checkbox" name="archive_firstmatch" id="archive_firstmatch" #echo ( ' ' , $ html_checked ) [ $ show . archive_firstmatch ] # >
<p>stop upgrading after matching the first best <em>Upgrade to</em> quality</p>
</span>
</label>
2015-02-16 03:17:56 +00:00
</div>
2016-02-19 17:38:38 +00:00
#end if
2015-02-16 03:17:56 +00:00
</div>
2016-02-19 17:38:38 +00:00
</div><!-- /component-group1 //-->
<div id="core-component-group2" class="component-group">
<div class="field-pair">
<label for="air_by_date">
<span class="component-title">Air by date release names</span>
<span class="component-desc">
<input type="checkbox" name="air_by_date" id="air_by_date" #echo ( ' ' , $ html_checked ) [ $ show . air_by_date ] # >
<p> #echo ( ' enable if releases contain dates ' , ' disable for episodic releases ' ) [ $ show . air_by_date ] # , example: <em class="grey-text">Show. #echo ( ' 03.02.2010 ' , ' S02E03 ' ) [ $ show . air_by_date ] # </em></p>
</span>
</label>
</div>
<div class="field-pair">
<label for="scene">
<span class="component-title">Scene numbering</span>
<span class="component-desc">
<input type="checkbox" name="scene" id="scene" #echo ( ' ' , $ html_checked ) [ $ show . scene ] # >
<p>find episodes numbered by release groups instead of the TV network <em class="grey-text">( #if $ show_has_scene_map then ' scene/manual numbers ' else ' manual numbers only ' # available)</em></p>
</span>
</label>
</div>
<div class="field-pair">
<label for="dvdorder">
<span class="component-title">Use DVD titles and numbers</span>
<span class="component-desc">
<input type="checkbox" name="dvdorder" id="dvdorder" #echo ( ' ' , $ html_checked ) [ $ show . dvdorder ] # >
<p> #echo ( ' enable to use DVD title and episode ordering ' , ' disable to use TV network title, number and aired order ' ) [ $ show . dvdorder ] # .
2016-09-24 11:23:22 +00:00
After changing this setting, a "force full update" is essential, and existing episodes should be manually renamed or replaced with #echo ( ' DVD ' , ' network ' ) [ $ show . dvdorder ] # numbered releases</p>
2016-02-19 17:38:38 +00:00
</span>
</label>
</div>
<div class="field-pair">
<label for="indexerLangSelectEdit">
<span class="component-title">Info language</span>
<span class="component-desc">
<select name="indexerLang" id="indexerLangSelectEdit" class="form-control form-control-inline input-sm"></select>
<span>fetch show information in this language</span>
</span>
</label>
</div>
<div class="field-pair">
<label for="sports">
<span class="component-title">Show is sports</span>
<span class="component-desc">
<input type="checkbox" name="sports" id="sports" #echo ( ' ' , $ html_checked ) [ $ show . sports ] # >
<p>treat this show as a sporting or MMA event</p>
</span>
</label>
</div>
<div class="field-pair">
<label for="anime">
<span class="component-title">Show is anime</span>
<span class="component-desc">
<input type="checkbox" name="anime" id="anime" #echo ( ' ' , $ html_checked ) [ $ show . is_anime ] # >
<p>releases for this show are named like ... <em class="grey-text">Show.265</em> instead of <em class="grey-text">Show.S02E03</em></p>
#if not $ show . is_anime # <span id="anime-options" style="display:none">Update Show then edit again to view additional options here</span> #end if#
</span>
</label>
</div>
#if $ show . is_anime
2015-02-16 03:17:56 +00:00
#import sickbeard . blackandwhitelist
#include $ os . path . join ( $ sickbeard . PROG_DIR , ' gui/slick/interfaces/default/inc_blackwhitelist.tmpl ' )
2016-02-19 17:38:38 +00:00
<script type="text/javascript" src=" $ sbRoot /js/blackwhite.js?v= $ sbPID "></script>
2014-05-27 07:44:23 +00:00
#end if
2016-02-19 17:38:38 +00:00
</div><!-- /component-group2 //-->
<div id="core-component-group3" class="component-group">
<div class="field-pair">
<label for="location">
<span class="component-title">Location for files</span>
<span class="component-desc">
<input type="text" name="location" id="location" value=" $ show . _location " class="form-control form-control-inline input-sm input350">
</span>
</label>
</div>
<div class="field-pair">
<label for="flatten_folders">
<span class="component-title">Flat folder hierarchy</span>
<span class="component-desc">
<input type="checkbox" name="flatten_folders" id="flatten_folders" #echo ( ' ' , $ html_checked ) [ $ show . flatten_folders and not $ sickbeard . NAMING_FORCE_FOLDERS ] # #echo ( ' ' , $ html_disabled ) [ $ sickbeard . NAMING_FORCE_FOLDERS ] # >
<p>prevent creating season folders to group files</p>
</span>
</label>
</div>
<div class="field-pair">
<label for="subtitles">
<span class="component-title">Subtitles</span>
<span class="component-desc">
<input type="checkbox" name="subtitles" id="subtitles" #echo ( ' ' , $ html_checked ) [ $ show . subtitles and $ sickbeard . USE_SUBTITLES ] # #echo ( $ html_disabled , ' ' ) [ $ sickbeard . USE_SUBTITLES ] # >
<p #if not $ sickbeard . USE_SUBTITLES # class="grey-text"><del #end if# >download episode subtitles for this show #if not $ sickbeard . USE_SUBTITLES # </del> ... (<span class="red-text">note: first <a href=" $ sbRoot /config/subtitles/">enable the subtitle system here</a></span>) #end if# </p>
</span>
</label>
</div>
2016-09-04 20:00:44 +00:00
<div class="field-pair">
<label for="idmapping">
<span class="component-title">Related show IDs</span>
<span class="component-desc">
<label for="idmapping">
<input id="idmapping" type="checkbox">
<span>TV info source IDs (advanced use only)</span>
</label>
</span>
</label>
</div>
#set $ dev = True
#set $ dev = None
<div id="idmapping-options" style="display: #if $ dev # -- #end if# none">
#set $ is_master_settable = False
#for $ src_id , $ src_name in $ sickbeard . indexerApi ( ) . all_indexers . iteritems ( )
#set $ is_master_settable | = ( $ dev or
( $ src_id != $ show . indexer and $ show . ids [ $ src_id ].get('id', 0) > 0 and
$ src_id in $ sickbeard . indexerApi ().indexers and not $ sickbeard . indexerApi ( $ src_id ).config.get('defunct') and
$ sickbeard . indexerApi ( $ src_id ).config.get('active')))
#if $ is_master_settable
#break
#end if
#end for
#set $ search_name = quote_plus ( $ sickbeard . indexermapper . clean_show_name ( $ show . name ) )
#for $ src_id , $ src_name in $ sickbeard . indexerApi ( ) . all_indexers . iteritems ( )
#set $ ok_src_id = $ show . ids [ $ src_id ] . get ( ' id ' , 0 ) > 0
#set $ maybe_master = ( $ src_id != $ show . indexer and
$ src_id in $ sickbeard . indexerApi ().indexers and not $ sickbeard . indexerApi ( $ src_id ).config.get('defunct') and
$ sickbeard . indexerApi ( $ src_id ).config.get('active'))
#set $ settable_master = ( $ dev or ( $ ok_src_id and $ maybe_master ) )
<div class="field-pair" style="padding:0">
<span class="component-title">
#if $ src_id in $ show . ids
#set $ src_search_url = sickbeard . indexerApi ( $ src_id ) . config . get ( ' finder ' )
#set $ use_search_url = $ src_search_url
#set $ data_link = ' data- '
#if $ ok_src_id and $ sickbeard . indexermapper . MapStatus . NOT_FOUND != $ show . ids [ $ src_id ] [ ' status ' ]
#set $ data_link = ' '
#set $ use_search_url = False
#end if
<a id="src-mid- $ src_id " class="service" style="margin-right:6px" data-search=" #if $ use_search_url # y #else # n #end if# " #if $ src_search_url # data-search-href=" $ anon_url ( $ src_search_url % $ search_name )" data-search-onclick="window.open(this.href, '_blank'); return !1;" data-search-title="Search for show at $ src_name " #end if# #if $ use_search_url # href=" $ anon_url ( $ src_search_url % $ search_name )" onclick="window.open(this.href, '_blank'); return !1;" title="Search for show at $ src_name " #end if# $(data_link)href=" $ anon_url (sickbeard.indexerApi( $ src_id ).config['show_url'], $ show . ids [ $ src_id ]['id'])" $(data_link)onclick="window.open(this.href, '_blank'); return !1;" $(data_link)title="View $ src_name info in new tab"><img alt=" $ src_name " height="16" width="16" src=" $ sbRoot /images/ $ sickbeard . indexerApi ( $ src_id ).config['icon']" /></a>
#end if
$ src_name
</span>
<span class="component-desc">
<input type="text" data-maybe-master=" #echo ( ' 0 ' , ' 1 ' ) [ bool ( $ maybe_master ) ] # " name="mid- $ src_id " id=" #echo ( ' mid- %s ' % $ src_id , ' source-id ' ) [ $ src_id == $ show . indexer ] # " value=" $ show . ids . get ( $ src_id , {'id': 0}).get('id')" class="form-control form-control-inline input-sm" #echo ( ' ' , $ html_disabled ) [ $ src_id == $ show . indexer ] # >
#if $ src_id != $ show . indexer
<label for="lockid- $ src_id ">
<input type="checkbox" name="lockid- $ src_id " id="lockid- $ src_id " #echo ( ' ' , $ html_checked ) [ $ show . ids . get ( $ src_id , { ' status ' : $ sickbeard . indexermapper . MapStatus . NONE } ) . get ( ' status ' ) == $ sickbeard . indexermapper . MapStatus . NO_AUTOMATIC_CHANGE ] # >
<p style="padding-left:19px;margin-right:24px">lock this ID</p>
</label>
#if $ settable_master
<label for="set-master- $ src_id ">
<input type="radio" name="set-master" id="set-master- $ src_id " data-indexer=" $ src_id " data-indexerid=" $ show . ids [ $ src_id ].get('id', 0)">set master
</label>
#end if
#else
<label for="the-master">
#if $ is_master_settable
<input type="radio" name="set-master" id="the-master" checked>
#end if
<p #if $ is_master_settable # style="padding-left:19px" #end if# >locked master, can't be edited</p>
</label>
#end if
</span>
</div>
#end for
<div class="field-pair" style="padding-top:0">
<span id="panel-save-get" class="component-desc show">
<p>invalid values can break finding episode and TV info</p>
<input type="button" value="Save Changes" id="save-mapping" class="btn btn-inline">
<p style="float:left;margin-right:6px">or</p>
<input type="button" value="Get Defaults" id="reset-mapping" class="btn btn-inline">
<p>for unlocked IDs</p>
</span>
<span id="save-wait" class="component-desc hide">
<span><img src=" $ sbRoot /images/loading16 #echo ( ' ' , ' -dark ' ) [ ' dark ' == $ sickbeard . THEME_NAME ] # .gif" style="margin-right:6px">Saving...</span>
</span>
</div>
</div>
2016-02-19 17:38:38 +00:00
</div><!-- /component-group3 //-->
</div>
<div style="margin-top:15px">
<input type="submit" id="submit" value="Update Show" class="btn btn-primary" />
<a href=" $ sbRoot /home/displayShow?show= $ show . indexerid " class="btn btn-primary" style="margin-left:10px">Cancel Edit</a>
</div>
</form>
</div>
2014-10-21 19:09:01 +00:00
</div>
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 ' )