mirror of
https://github.com/SickGear/SickGear.git
synced 2024-12-04 18:33:38 +00:00
321 lines
11 KiB
Cheetah
321 lines
11 KiB
Cheetah
#import sickbeard
|
|
#import lib.adba as adba
|
|
#from sickbeard import common
|
|
#from sickbeard import exceptions
|
|
#from sickbeard import scene_exceptions
|
|
#import sickbeard.blackandwhitelist
|
|
|
|
#set global $title = 'Edit ' + $show.name
|
|
#set global $header = 'Edit ' + $show.name
|
|
|
|
#set global $sbPath = '..'
|
|
#set html_checked = ' checked="checked"'
|
|
#set html_disabled = ' disabled="disabled"'
|
|
|
|
#set global $topmenu = 'home'
|
|
#import os.path
|
|
|
|
#include $os.path.join($sickbeard.PROG_DIR, 'gui/slick/interfaces/default/inc_top.tmpl')
|
|
|
|
<script type="text/javascript" src="$sbRoot/js/qualityChooser.js?$sbPID"></script>
|
|
<script type="text/javascript" charset="utf-8">
|
|
<!--
|
|
\$(document).ready(function(){
|
|
|
|
\$.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)
|
|
|
|
$('tag')
|
|
});
|
|
});
|
|
//-->
|
|
</script>
|
|
|
|
#if $varExists('header')
|
|
<h1 class="header">$header</h1>
|
|
#else
|
|
<h1 class="title">$title</h1>
|
|
#end if
|
|
|
|
<form action="editShow" method="post" id="addShowForm">
|
|
<input type="hidden" name="show" value="$show.indexerid">
|
|
|
|
<div id="editShow" class="stepDiv linefix">
|
|
|
|
<div class="field-pair #if $sickbeard.SHOWLIST_TAGVIEW != 'custom' then 'hidden' else ''#" style="margin-bottom:10px">
|
|
<label for="tag">
|
|
<span class="component-title">Tag</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</option>
|
|
#end for
|
|
</select>
|
|
<span>used for show list page split view</span>
|
|
</span>
|
|
</label>
|
|
</div>
|
|
|
|
<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>
|
|
|
|
<div class="field-pair">
|
|
#set $qualities = $common.Quality.splitQuality(int($show.quality))
|
|
#set global $anyQualities = $qualities[0]
|
|
#set global $bestQualities = $qualities[1]
|
|
#include $os.path.join($sickbeard.PROG_DIR, 'gui/slick/interfaces/default/inc_qualityChooser.tmpl')
|
|
|
|
#if $anyQualities + $bestQualities
|
|
<div class="field-pair">
|
|
<label for="archive_firstmatch">
|
|
<span class="component-title">Archive on first match</span>
|
|
<span class="component-desc">
|
|
<input type="checkbox" name="archive_firstmatch" id="archive_firstmatch"#if $show.archive_firstmatch == 1 then $html_checked else ''#>
|
|
<p>enable to have the episode archived after the first best match is found from your archive quality list</p>
|
|
</span>
|
|
</label>
|
|
</div>
|
|
#end if
|
|
</div>
|
|
|
|
<div class="field-pair">
|
|
<label for="SceneName">
|
|
<span class="component-title">Scene exception</span>
|
|
<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">
|
|
<p class="clear-left note">add alternative release names found on search providers for <b class="boldest grey-text">$show.name</b></p>
|
|
</span>
|
|
<span class="component-desc">
|
|
<div id="SceneException">
|
|
<h4 class="grey-text">Exceptions list (multi-selectable)</h4>
|
|
<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>
|
|
<span><p class="note">this list overrides the original name<br />to search, it doesn't append to it</p></span>
|
|
<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">
|
|
<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. [word1,word2, ... ,word_n]</p>
|
|
<p class="note">ignore search result <em class="grey-text">if its title contains any</em> of these comma seperated words</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. [word1,word2, ... ,word_n]</p>
|
|
<p class="note">ignore search result <em class="grey-text">unless its title contains one</em> of these comma seperated words</p>
|
|
</span>
|
|
</label>
|
|
</div>
|
|
|
|
<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 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">
|
|
<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>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>
|
|
|
|
<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>
|
|
|
|
#if $show.is_anime:
|
|
#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>
|
|
#end if
|
|
<input type="submit" id="submit" value="Submit" class="btn btn-primary" />
|
|
</form>
|
|
|
|
<script type="text/javascript" charset="utf-8">
|
|
<!--
|
|
var all_exceptions = new Array;
|
|
|
|
jQuery('#location').fileBrowser({ title: 'Select Show Location' });
|
|
|
|
\$('#submit').click(function(){
|
|
all_exceptions = []
|
|
|
|
\$('#exceptions_list option').each ( function() {
|
|
all_exceptions.push( \$(this).val() );
|
|
});
|
|
|
|
\$('#exceptions_list').val(all_exceptions);
|
|
#if $show.is_anime:
|
|
generate_bwlist()
|
|
#end if
|
|
});
|
|
|
|
\$('#addSceneName').click(function() {
|
|
var scene_ex = \$('#SceneName').val()
|
|
var option = \$('<option>')
|
|
all_exceptions = []
|
|
|
|
\$('#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() {
|
|
\$('#exceptions_list option:selected').remove();
|
|
|
|
\$(this).toggle_SceneException()
|
|
});
|
|
|
|
$.fn.toggle_SceneException = function() {
|
|
all_exceptions = []
|
|
|
|
\$('#exceptions_list option').each ( function() {
|
|
all_exceptions.push( \$(this).val() );
|
|
});
|
|
|
|
if ('' == all_exceptions)
|
|
\$('#SceneException').hide();
|
|
else
|
|
\$('#SceneException').show();
|
|
}
|
|
|
|
\$(this).toggle_SceneException();
|
|
//-->
|
|
</script>
|
|
</div>
|
|
#include $os.path.join($sickbeard.PROG_DIR, 'gui/slick/interfaces/default/inc_bottom.tmpl')
|