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
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
#set global $ header = ' Edit ' + $ show . name
#set global $ sbPath = ' .. '
#set global $ topmenu = ' home '
2015-05-07 00:36:40 +00:00
##
2015-02-16 03:17:56 +00:00
#import os . path
#include $ os . path . join ( $ sickbeard . PROG_DIR , ' gui/slick/interfaces/default/inc_top.tmpl ' )
2014-03-10 05:18:05 +00:00
<script type="text/javascript" src=" $ sbRoot /js/qualityChooser.js? $ sbPID "></script>
<script type="text/javascript" charset="utf-8">
<!--
\$(document).ready(function(){
2015-02-16 03:17:56 +00:00
\$.getJSON(' $ sbRoot /home/addShows/getIndexerLanguages', {}, function(data) {
var resultStr = '';
if (data.results.length == 0) {
flag = ' class="flag" style="background-image:url( $ sbRoot /images/flags/ ${ show . lang } .png)"';
resultStr = '<option value=" $ show . lang " selected="selected" + flag> $ show . lang </option>';
} else {
var current_lang_added = false;
\$.each(data.results, function(index, obj) {
if (obj == ' $ show . lang ') {
selected = ' selected="selected"';
current_lang_added = true;
}
else {
selected = '';
}
flag = ' class="flag" style="background-image:url( $ sbRoot /images/flags/' + obj + '.png);"';
resultStr += '<option value="' + obj + '"' + selected + flag + '>' + obj + '</option>';
});
if (!current_lang_added)
resultStr += '<option value=" $ show . lang " selected="selected"> $ show . lang </option>';
}
\$(' #indexerLangSelectEdit ' ).html(resultStr)
2015-04-07 03:10:50 +00:00
2015-02-16 03:17:56 +00:00
});
2014-03-10 05:18:05 +00:00
});
//-->
</script>
2015-02-16 03:17:56 +00:00
#if $ varExists ( ' header ' )
<h1 class="header"> $ header </h1>
#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 " '
2015-02-16 03:17:56 +00:00
<form action="editShow" method="post" id="addShowForm">
<input type="hidden" name="show" value=" $ show . indexerid ">
2015-03-24 18:11:51 +00:00
<div id="editShow" class="stepDiv linefix">
2015-02-16 03:17:56 +00:00
<div class="field-pair">
<label for="paused">
<span class="component-title">Paused</span>
<span class="component-desc">
<input type="checkbox" name="paused" id="paused" #if 1 == $ show . paused then $ html_checked else ' ' # >
<p>enable to pause searching providers for show episodes</p>
</span>
</label>
</div>
2014-03-10 05:18:05 +00:00
2015-02-16 03:17:56 +00:00
<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
2015-07-16 23:09:27 +00:00
<div class="field-pair show-if-quality-custom">
2015-02-16 03:17:56 +00:00
<label for="archive_firstmatch">
2015-05-13 19:43:03 +00:00
<span class="component-title">End upgrade on first match</span>
2015-02-16 03:17:56 +00:00
<span class="component-desc">
<input type="checkbox" name="archive_firstmatch" id="archive_firstmatch" #if $ show . archive_firstmatch == 1 then $ html_checked else ' ' # >
2015-05-13 19:43:03 +00:00
<p>mark an episode complete after the first best match is found from the <em>Upgrade to</em> quality list</p>
2015-02-16 03:17:56 +00:00
</span>
</label>
</div>
2014-05-04 04:07:49 +00:00
#end if
2015-02-16 03:17:56 +00:00
</div>
<div class="field-pair">
<label for="SceneName">
2015-03-24 18:11:51 +00:00
<span class="component-title">Scene exception</span>
2015-02-16 03:17:56 +00:00
<span class="component-desc">
<input type="text" id="SceneName" class="form-control form-control-inline input-sm input200">
<input class="btn btn-inline" type="button" value="Add" id="addSceneName">
2015-03-24 18:11:51 +00:00
<p class="clear-left note">add alternative release names found on search providers for <b class="boldest grey-text"> $ show . name </b></p>
2015-02-16 03:17:56 +00:00
</span>
<span class="component-desc">
<div id="SceneException">
2015-03-24 18:11:51 +00:00
<h4 class="grey-text">Exceptions list (multi-selectable)</h4>
2015-02-16 03:17:56 +00:00
<select id="exceptions_list" name="exceptions_list" multiple="multiple" class="input200" style="min-height:90px; float:left" >
#for $ cur_exception in $ show . exceptions :
<option value=" $ cur_exception "> $ cur_exception </option>
#end for
</select>
2015-03-24 18:11:51 +00:00
<span><p class="note">this list overrides the original name<br />to search, it doesn't append to it</p></span>
2015-02-16 03:17:56 +00:00
<div>
<input id="removeSceneName" value="Remove" class="btn pull-left" type="button" style="margin-top: 10px;"/>
</div>
</div>
</span>
</label>
<div style="clear:right"> </div>
</div>
<div class="field-pair">
<label for="rls_ignore_words">
2015-03-24 18:11:51 +00:00
<span class="component-title">Ignore result with any word</span>
2015-02-16 03:17:56 +00:00
<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. [word1,word2, ... ,word_n]</p>
2015-03-24 18:11:51 +00:00
<p class="note">ignore search result <em class="grey-text">if its title contains any</em> of these comma seperated words</p>
2015-02-16 03:17:56 +00:00
</span>
</label>
</div>
<div class="field-pair">
<label for="rls_require_words">
2015-03-24 18:11:51 +00:00
<span class="component-title">Require at least one word</span>
2015-02-16 03:17:56 +00:00
<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. [word1,word2, ... ,word_n]</p>
2015-03-24 18:11:51 +00:00
<p class="note">ignore search result <em class="grey-text">unless its title contains one</em> of these comma seperated words</p>
2015-02-16 03:17:56 +00:00
</span>
</label>
</div>
<div class="field-pair">
<label for="location">
2015-03-24 18:11:51 +00:00
<span class="component-title">Location for files</span>
2015-02-16 03:17:56 +00:00
<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 structure</span>
<span class="component-desc">
<input type="checkbox" name="flatten_folders" id="flatten_folders" #if 1 == $ show . flatten_folders and not $ sickbeard . NAMING_FORCE_FOLDERS then $ html_checked else ' ' # #if $ sickbeard . NAMING_FORCE_FOLDERS then $ html_disabled else ' ' # >
<p>enable to prevent creating the folders normally used to group seasons</p>
</span>
</label>
</div>
<div class="field-pair">
<label for="air_by_date">
<span class="component-title">Air by date episode names</span>
<span class="component-desc">
<input type="checkbox" name="air_by_date" id="air_by_date" #if 1 == $ show . air_by_date then $ html_checked else ' ' # >
<p>enable if episode releases are named ... <em class="grey-text">Show.03.02.2010</em> instead of <em class="grey-text">Show.S02E03</em></p>
</span>
</label>
</div>
<div class="field-pair">
<label for="dvdorder">
<span class="component-title">Use DVD order</span>
<span class="component-desc">
<input type="checkbox" name="dvdorder" id="dvdorder" #if 1 == $ show . dvdorder then $ html_checked else ' ' # >
<p>for episode titles, numbering etc. instead of the order the show aired on the network</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" #if $ show . scene == 1 then $ html_checked else ' ' # >
<p>search for episodes that are numbered by scene groups instead of by the TV network</p>
</span>
</label>
</div>
<div class="field-pair" style="margin-bottom:10px">
<label for="indexerLangSelectEdit">
2015-03-24 18:11:51 +00:00
<span class="component-title">Info language</span>
2015-02-16 03:17:56 +00:00
<span class="component-desc">
<select name="indexerLang" id="indexerLangSelectEdit" class="form-control form-control-inline input-sm"></select>
<span>attempt to fetch show data and episode filenames in this language</span>
</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" #if 1 == $ show . subtitles and $ sickbeard . USE_SUBTITLES then $ html_checked else ' ' # #if not $ sickbeard . USE_SUBTITLES then $ html_disabled else ' ' # >
<p #if not $ sickbeard . USE_SUBTITLES then ' class= " grey-text " ><del ' else ' ' # >attempt to download episode subtitles for this show #if not $ sickbeard . USE_SUBTITLES then ' </del> ... (<span class= " red-text " >note: first <a href= " %s /config/subtitles/ " >enable the subtitle system here</a></span>) ' % $ sbRoot else ' ' # </p>
</span>
</label>
</div>
2015-07-16 23:09:27 +00:00
<div class="field-pair #if $ sickbeard . SHOWLIST_TAGVIEW != ' custom ' then ' hidden ' else ' ' # " style="margin-bottom:10px">
<label for="tag">
<span class="component-title">Show is in group</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>and is displayed on the show list page under this section</span>
</span>
</label>
</div>
2015-02-16 03:17:56 +00:00
<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" #if 1 == $ show . sports then $ html_checked else ' ' # >
<p>enable to 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" #if $ show . is_anime then $ html_checked else ' ' # >
<p>enable if this show is anime and episode releases are named ... <em class="grey-text">Show.265</em> instead of <em class="grey-text">Show.S02E03</em></p>
</span>
</label>
</div>
2014-04-24 05:18:16 +00:00
2014-07-18 00:43:36 +00:00
#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 ' )
<script type="text/javascript" src=" $ sbRoot /js/blackwhite.js? $ sbPID "></script>
2014-05-27 07:44:23 +00:00
#end if
2015-02-16 03:17:56 +00:00
<input type="submit" id="submit" value="Submit" class="btn btn-primary" />
</form>
2014-03-10 05:18:05 +00:00
<script type="text/javascript" charset="utf-8">
<!--
2015-02-16 03:17:56 +00:00
var all_exceptions = new Array;
jQuery(' #location ' ).fileBrowser( { title: ' Select Show Location ' });
2014-03-10 05:18:05 +00:00
2015-02-16 03:17:56 +00:00
\$(' #submit ' ).click(function() {
2014-03-10 05:18:05 +00:00
all_exceptions = []
2014-05-29 13:27:05 +00:00
2015-02-16 03:17:56 +00:00
\$(' #exceptions _list option ' ).each ( function() {
2014-03-10 05:18:05 +00:00
all_exceptions.push( \$(this).val() );
2015-02-16 03:17:56 +00:00
});
\$(' #exceptions _list ' ).val(all_exceptions);
#if $ show . is_anime :
2015-01-25 11:58:49 +00:00
generate_bwlist()
2015-02-16 03:17:56 +00:00
#end if
2015-01-25 11:58:49 +00:00
});
2015-02-16 03:17:56 +00:00
\$(' #addSceneName ' ).click(function() {
var scene_ex = \$(' #SceneName ' ).val()
var option = \$('<option>')
2014-03-10 05:18:05 +00:00
all_exceptions = []
2015-02-16 03:17:56 +00:00
\$(' #exceptions _list option ' ).each ( function() {
all_exceptions.push( \$(this).val() )
});
\$(' #SceneName ' ).val( ' ' )
if (jQuery.inArray(scene_ex, all_exceptions) > -1 || (scene_ex == ''))
return
\$(' #SceneException ' ).show()
option.attr('value',scene_ex)
option.html(scene_ex)
return option.appendTo(' #exceptions _list ' );
});
\$(' #removeSceneName ' ).click(function() {
2014-03-10 05:18:05 +00:00
\$(' #exceptions _list option : selected ' ).remove();
\$(this).toggle_SceneException()
2015-02-16 03:17:56 +00:00
});
$.fn.toggle_SceneException = function() {
all_exceptions = []
\$(' #exceptions _list option ' ).each ( function() {
2014-03-10 05:18:05 +00:00
all_exceptions.push( \$(this).val() );
2015-02-16 03:17:56 +00:00
});
if ('' == all_exceptions)
\$(' #SceneException ' ).hide();
2014-03-10 05:18:05 +00:00
else
2015-02-16 03:17:56 +00:00
\$(' #SceneException ' ).show();
2014-03-10 05:18:05 +00:00
}
2014-05-29 13:27:05 +00:00
\$(this).toggle_SceneException();
2014-03-10 05:18:05 +00:00
//-->
</script>
2014-10-21 19:09:01 +00:00
</div>
2015-05-07 00:36:40 +00:00
#include $ os . path . join ( $ sickbeard . PROG_DIR , ' gui/slick/interfaces/default/inc_bottom.tmpl ' )