Private GIT

Skip to content
Snippets Groups Projects
Commit 22c3b7ef authored by Alexis Tyler's avatar Alexis Tyler
Browse files

editShow mako

parent 549d6859
No related branches found
No related tags found
No related merge requests found
#import sickbeard <%!
#import adba import sickbeard
#from sickbeard import common import adba
#from sickbeard.common import * from sickbeard import common
#from sickbeard import exceptions from sickbeard.common import *
#from sickbeard import scene_exceptions from sickbeard import exceptions
#from sickbeard.blackandwhitelist import * from sickbeard import scene_exceptions
#set global $title="Edit " + $show.name from sickbeard.blackandwhitelist import *
#set global $header="Edit " + $show.name global title="Edit " + $show.name
global header="Edit " + $show.name
#set global $sbPath=".."
global sbPath=".."
#set global $topmenu="home"
#import os.path global topmenu="home"
#include $os.path.join($sickbeard.PROG_DIR, "gui/slick/interfaces/default/inc_top.tmpl") import os.path
include file=os.path.join(sickbeard.PROG_DIR, "gui/slick/interfaces/default/inc_top.mako")
%>
#if $varExists('header')
<h1 class="header">$header</h1> % if not header is UNDEFINED:
#else <h1 class="header">${header}</h1>
<h1 class="title">$title</h1> % else
#end if <h1 class="title">${title}</h1>
% endif
<div id="editShow"> <div id="editShow">
<script type="text/javascript" src="$sbRoot/js/qualityChooser.js?$sbPID"></script> <script type="text/javascript" src="${sbRoot}/js/qualityChooser.js?${sbPID}"></script>
<script type="text/javascript" src="$sbRoot/js/lib/bootstrap-formhelpers.min-2.3.0.js?$sbPID"></script> <script type="text/javascript" src="${sbRoot}/js/lib/bootstrap-formhelpers.min-2.3.0.js?${sbPID}"></script>
<form action="editShow" method="post"> <form action="editShow" method="post">
<input type="hidden" name="show" value="$show.indexerid" /> <input type="hidden" name="show" value="${show.indexerid}" />
<b>Location:</b></br> <b>Location:</b></br>
<input type="text" name="location" id="location" value="$show._location" class="form-control form-control-inline input-sm input350" /><br /> <input type="text" name="location" id="location" value="${show._location}" class="form-control form-control-inline input-sm input350" /><br />
<br /> <br />
<b>Scene Exception:</b><br /> <b>Scene Exception:</b><br />
...@@ -43,9 +42,9 @@ This will <b>affect the episode show search</b> on nzb and torrent provider.<br ...@@ -43,9 +42,9 @@ This will <b>affect the episode show search</b> on nzb and torrent provider.<br
<div class="pull-left" style="text-align:center;"> <div class="pull-left" style="text-align:center;">
<h4>Exceptions List</h4> <h4>Exceptions List</h4>
<select id="exceptions_list" name="exceptions_list" multiple="multiple" style="min-width:10em;" > <select id="exceptions_list" name="exceptions_list" multiple="multiple" style="min-width:10em;" >
#for $cur_exception in $show.exceptions: % for cur_exception in show.exceptions:
<option value="$cur_exception">$cur_exception</option> <option value="${cur_exception}">${cur_exception}</option>
#end for % endfor
</select> </select>
<div> <div>
<input id="removeSceneName" value="Remove" class="btn float-left" type="button" style="margin-top: 10px;"/> <input id="removeSceneName" value="Remove" class="btn float-left" type="button" style="margin-top: 10px;"/>
...@@ -57,18 +56,20 @@ This will <b>affect the episode show search</b> on nzb and torrent provider.<br ...@@ -57,18 +56,20 @@ This will <b>affect the episode show search</b> on nzb and torrent provider.<br
<br /> <br />
<b>Quality:</b><br /> <b>Quality:</b><br />
#set $qualities = $common.Quality.splitQuality(int($show.quality)) <%
#set global $anyQualities = $qualities[0] qualities = common.Quality.splitQuality(int(show.quality))
#set global $bestQualities = $qualities[1] global anyQualities = qualities[0]
#include $os.path.join($sickbeard.PROG_DIR, "gui/slick/interfaces/default/inc_qualityChooser.tmpl") global bestQualities = qualities[1]
include file=os.path.join(sickbeard.PROG_DIR, "gui/slick/interfaces/default/inc_qualityChooser.mako")
%>
<br /> <br />
<b>Default Episode Status:</b><br /> <b>Default Episode Status:</b><br />
(this will set the status for future episodes)<br /> (this will set the status for future episodes)<br />
<select name="defaultEpStatus" id="defaultEpStatusSelect" class="form-control form-control-inline input-sm"> <select name="defaultEpStatus" id="defaultEpStatusSelect" class="form-control form-control-inline input-sm">
#for $curStatus in [$WANTED, $SKIPPED, $ARCHIVED, $IGNORED]: % for curStatus in [WANTED, SKIPPED, ARCHIVED, IGNORED]:
<option value="$curStatus" #if $curStatus == $show.default_ep_status then 'selected="selected"' else ''#>$statusStrings[$curStatus]</option> <option value="${curStatus}" #if $curStatus == $show.default_ep_status then 'selected="selected"' else ''#>${statusStrings[curStatus]}</option>
#end for % endfor
</select><br /> </select><br />
<br /> <br />
...@@ -114,12 +115,12 @@ This will <b>affect the episode show search</b> on nzb and torrent provider.<br ...@@ -114,12 +115,12 @@ This will <b>affect the episode show search</b> on nzb and torrent provider.<br
(check this if you wish to use the DVD order instead of the Airing order. A "Force Full Update" is necessary, and if you have existing episodes you need to move them) (check this if you wish to use the DVD order instead of the Airing order. A "Force Full Update" is necessary, and if you have existing episodes you need to move them)
<br/><br/> <br/><br/>
#if $anyQualities + $bestQualities % if anyQualities + bestQualities
<b>Archive on first match:</b> <b>Archive on first match:</b>
<input type="checkbox" name="archive_firstmatch" #if $show.archive_firstmatch == 1 then "checked=\"checked\"" else ""# /><br> <input type="checkbox" name="archive_firstmatch" #if $show.archive_firstmatch == 1 then "checked=\"checked\"" else ""# /><br>
(check this to have the episode archived after the first best match is found from your archive quality list)</br> (check this to have the episode archived after the first best match is found from your archive quality list)</br>
<br /> <br />
#end if % endif
<b>Ignored Words:</b></br> <b>Ignored Words:</b></br>
<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" /><br /> <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" /><br />
...@@ -133,11 +134,11 @@ Results with no word from this list will be ignored<br /> ...@@ -133,11 +134,11 @@ Results with no word from this list will be ignored<br />
Separate words with a comma, e.g. "word1,word2,word3"<br /> Separate words with a comma, e.g. "word1,word2,word3"<br />
<br /> <br />
#if $show.is_anime: % if show.is_anime:
#from sickbeard.blackandwhitelist import * % from sickbeard.blackandwhitelist import *
#include $os.path.join($sickbeard.PROG_DIR, "gui/slick/interfaces/default/inc_blackwhitelist.tmpl") % include os.path.join(sickbeard.PROG_DIR, "gui/slick/interfaces/default/inc_blackwhitelist.mako")
<script type="text/javascript" src="$sbRoot/js/blackwhite.js?$sbPID"></script> <script type="text/javascript" src="${sbRoot}/js/blackwhite.js?${sbPID}"></script>
#end if % endif
<input type="submit" id="submit" value="Submit" class="btn btn-primary" /> <input type="submit" id="submit" value="Submit" class="btn btn-primary" />
</form> </form>
...@@ -157,10 +158,9 @@ Separate words with a comma, e.g. "word1,word2,word3"<br /> ...@@ -157,10 +158,9 @@ Separate words with a comma, e.g. "word1,word2,word3"<br />
\$("#exceptions_list").val(all_exceptions); \$("#exceptions_list").val(all_exceptions);
#if $show.is_anime: % if show.is_anime:
generate_bwlist() generate_bwlist()
% endif
#end if
}); });
\$('#addSceneName').click(function() { \$('#addSceneName').click(function() {
var scene_ex = \$('#SceneName').val() var scene_ex = \$('#SceneName').val()
...@@ -207,4 +207,4 @@ Separate words with a comma, e.g. "word1,word2,word3"<br /> ...@@ -207,4 +207,4 @@ Separate words with a comma, e.g. "word1,word2,word3"<br />
//--> //-->
</script> </script>
</div> </div>
#include $os.path.join($sickbeard.PROG_DIR,"gui/slick/interfaces/default/inc_bottom.tmpl") % include os.path.join(sickbeard.PROG_DIR, "gui/slick/interfaces/default/inc_bottom.mako")
#import sickbeard
#import adba
#from sickbeard import common
#from sickbeard.common import *
#from sickbeard import exceptions
#from sickbeard import scene_exceptions
#from sickbeard.blackandwhitelist import *
#set global $title="Edit " + $show.name
#set global $header="Edit " + $show.name
#set global $sbPath=".."
#set global $topmenu="home"
#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
<div id="editShow">
<script type="text/javascript" src="$sbRoot/js/qualityChooser.js?$sbPID"></script>
<script type="text/javascript" src="$sbRoot/js/lib/bootstrap-formhelpers.min-2.3.0.js?$sbPID"></script>
<form action="editShow" method="post">
<input type="hidden" name="show" value="$show.indexerid" />
<b>Location:</b></br>
<input type="text" name="location" id="location" value="$show._location" class="form-control form-control-inline input-sm input350" /><br />
<br />
<b>Scene Exception:</b><br />
<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"><br />
This will <b>affect the episode show search</b> on nzb and torrent provider.<br />
This list overrides the original name, it doesn't append to it.<br />
<div id="SceneException" >
<div class="pull-left" style="text-align:center;">
<h4>Exceptions List</h4>
<select id="exceptions_list" name="exceptions_list" multiple="multiple" style="min-width:10em;" >
#for $cur_exception in $show.exceptions:
<option value="$cur_exception">$cur_exception</option>
#end for
</select>
<div>
<input id="removeSceneName" value="Remove" class="btn float-left" type="button" style="margin-top: 10px;"/>
</div>
<br />
</div>
</div>
<div class="clearfix"></div>
<br />
<b>Quality:</b><br />
#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")
<br />
<b>Default Episode Status:</b><br />
(this will set the status for future episodes)<br />
<select name="defaultEpStatus" id="defaultEpStatusSelect" class="form-control form-control-inline input-sm">
#for $curStatus in [$WANTED, $SKIPPED, $ARCHIVED, $IGNORED]:
<option value="$curStatus" #if $curStatus == $show.default_ep_status then 'selected="selected"' else ''#>$statusStrings[$curStatus]</option>
#end for
</select><br />
<br />
<b>Info Language:</b><br />
(this will only affect the language of the retrieved metadata file contents and episode filenames)<br />
<select name="indexerLang" id="indexerLangSelect" class="form-control form-control-inline input-sm bfh-languages" data-language="#echo $show.lang#" data-available="#echo ','.join($sickbeard.indexerApi().config['valid_languages'])#"></select><br />
<br />
<b>Flatten files (no folders): </b> <input type="checkbox" name="flatten_folders" #if $show.flatten_folders == 1 and not $sickbeard.NAMING_FORCE_FOLDERS then "checked=\"checked\"" else ""# #if $sickbeard.NAMING_FORCE_FOLDERS then "disabled=\"disabled\"" else ""#/><br />
(Disabled: episodes folder-grouped by season. Enabled: no season folders)<br/>
<br />
<b>Paused: </b> <input type="checkbox" name="paused" #if $show.paused == 1 then "checked=\"checked\"" else ""# /><br />
(check this if you wish to pause this show. Will not download anything until unpause)<br/>
<br />
<b>Subtitles: </b> <input type="checkbox" name="subtitles"#if $show.subtitles == 1 and $sickbeard.USE_SUBTITLES then " checked=\"checked\"" else ""##if not $sickbeard.USE_SUBTITLES then " disabled=\"disabled\"" else ""#/><br />
(check this if you wish to search for subtitles in this show)<br/>
<br />
<b>Scene Numbering: </b>
<input type="checkbox" name="scene" #if $show.scene == 1 then "checked=\"checked\"" else ""# /><br/>
(check this if you wish to search by scene numbering, uncheck to search by indexer numbering)<br/>
<br/>
<b>Air by date: </b>
<input type="checkbox" name="air_by_date" #if $show.air_by_date == 1 then "checked=\"checked\"" else ""# /><br />
(check this if the show is released as Show.03.02.2010 rather than Show.S02E03. <span style="color:red">In case air date conflict between regular and special episodes, the later will be ignored.</span>)<br />
<br />
<b>Sports: </b>
<input type="checkbox" name="sports" #if $show.sports == 1 then "checked=\"checked\"" else ""# /><br />
(check this if the show is a sporting or MMA event and released as Show.03.02.2010 rather than Show.S02E03. <span style="color:red">In case air date conflict between regular and special episodes, the later will be ignored.</span>)<br />
<br />
<b>Anime: </b>
<input type="checkbox" name="anime" #if $show.is_anime then "CHECKED" else ""#><br />
(check this if the show is released as Show.265 rather than Show.S02E03, this show is an anime)<br />
<br />
<b>DVD Order: </b>
<input type="checkbox" name="dvdorder" #if $show.dvdorder == 1 then "checked=\"checked\"" else ""# /><br/>
(check this if you wish to use the DVD order instead of the Airing order. A "Force Full Update" is necessary, and if you have existing episodes you need to move them)
<br/><br/>
#if $anyQualities + $bestQualities
<b>Archive on first match:</b>
<input type="checkbox" name="archive_firstmatch" #if $show.archive_firstmatch == 1 then "checked=\"checked\"" else ""# /><br>
(check this to have the episode archived after the first best match is found from your archive quality list)</br>
<br />
#end if
<b>Ignored Words:</b></br>
<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" /><br />
Results with one or more word from this list will be ignored<br />
Separate words with a comma, e.g. "word1,word2,word3"<br />
<br />
<b>Required Words:</b></br>
<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" /><br />
Results with no word from this list will be ignored<br />
Separate words with a comma, e.g. "word1,word2,word3"<br />
<br />
#if $show.is_anime:
#from sickbeard.blackandwhitelist import *
#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")
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment