Change to add clarity to the subtitle and other columns on the Mass Update page.

Add tooltips to explain why any the 6 action columns are disabled when required.
Change to reclaimed screen estate by hiding unused columns.
Change option on Mass Edit page to be inline with show edit page.
Change reduce whitespace output, simplify and cleanup code to standards.
This commit is contained in:
JackDandy 2015-03-21 17:47:16 +00:00
parent b40d56ceae
commit 6c25ee69df
4 changed files with 321 additions and 295 deletions

View file

@ -65,6 +65,10 @@
* Change to separate "Set as wanted" to prevent disaster selection on Episode Overview page
* Remove restriction to not display snatched eps link in footer on Episode Overview page
* Change the shows episodes count text colour to visually separete from year numbers at the end of show names
* Change to add clarity to the subtitle and other columns on the Mass Update page
* Add tooltips to explain why any the 6 action columns are disabled when required on the Mass Update page
* Change to reclaimed screen estate by hiding unused columns on the Mass Update page
* Change order of option on Mass Edit page to be inline with show edit page
* Fix release group not recognised from manually downloaded filename
* Change to gracefully handle some "key not found" failures when TVDB or TVRage return "Not Found" during show updates
* Change no longer stamp files where airdates are never

View file

@ -3310,6 +3310,10 @@ tablesorter.css
vertical-align:middle
}
.tablesorter .narrow.tablesorter-header{
padding:4px 18px 4px 4px
}
.tablesorter thead .sorter-false{
background-image:none;
padding:4px;

View file

@ -1,80 +1,92 @@
#import sickbeard
#from sickbeard.common import *
#set global $title="Mass Update"
#set global $header="Mass Update"
#set global $title = 'Mass Update'
#set global $header = 'Mass Update'
#set global $sbPath="../.."
#set global $sbPath = '../..'
#set global $topmenu="manage"
#set global $topmenu = 'manage'
#import os.path
#include $os.path.join($sickbeard.PROG_DIR, "gui/slick/interfaces/default/inc_top.tmpl")
#include $os.path.join($sickbeard.PROG_DIR, 'gui/slick/interfaces/default/inc_top.tmpl')
#set $has_any_sports = False
#set $has_any_anime = False
#set $has_any_flat_folders = False
#set $myShowList = $sickbeard.showList
$myShowList.sort(lambda x, y: cmp(x.name, y.name))
#for $curShow in $myShowList
#set $has_any_sports |= bool($curShow.sports)
#set $has_any_anime |= bool($curShow.anime)
#set $has_any_flat_folders |= $bool(curShow.flatten_folders)
#end for
<script type="text/javascript" charset="utf-8">
<!--
\$.tablesorter.addParser({
id: 'showNames',
is: function(s) {
return false;
},
format: function(s) {
#if not $sickbeard.SORT_ARTICLE:
id: 'showNames',
is: function(s) {
return false;
},
format: function(s) {
#if not $sickbeard.SORT_ARTICLE
return (s || '').replace(/^(?:(?:A(?!\s+to)n?)|The)\s(\w)/i, '$1');
#else:
#else
return (s || '');
#end if
},
type: 'text'
},
type: 'text'
});
\$.tablesorter.addParser({
id: 'quality',
is: function(s) {
return false;
},
format: function(s) {
return s.replace('hd1080p',5).replace('hd720p',4).replace('hd',3).replace('sd',2).replace('any',1).replace('best',0).replace('custom',7);
},
type: 'numeric'
id: 'quality',
is: function(s) {
return false;
},
format: function(s) {
return s.replace('hd1080p', 5).replace('hd720p', 4).replace('hd', 3).replace('sd', 2).replace('any', 1).replace('best', 0).replace('custom', 7);
},
type: 'numeric'
});
\$(document).ready(function()
{
\$("#massUpdateTable:has(tbody tr)").tablesorter({
sortList: [[1,0]],
textExtraction: {
2: function(node) { return \$(node).find("span").text().toLowerCase(); },
3: function(node) { return \$(node).find("img").attr("alt"); },
4: function(node) { return \$(node).find("img").attr("alt"); },
5: function(node) { return \$(node).find("img").attr("alt"); },
6: function(node) { return \$(node).find("img").attr("alt"); },
7: function(node) { return \$(node).find("img").attr("alt"); }
},
widgets: ['zebra'],
headers: {
0: { sorter: false},
1: { sorter: 'showNames'},
2: { sorter: 'quality'},
3: { sorter: 'sports'},
4: { sorter: 'scene'},
5: { sorter: 'anime'},
6: { sorter: 'flatfold'},
7: { sorter: 'paused'},
8: { sorter: 'status'},
9: { sorter: false},
10: { sorter: false},
11: { sorter: false},
12: { sorter: false},
13: { sorter: false},
14: { sorter: false},
15: { sorter: false}
}
});
#set $columns_total = 15 - ((1, 0)[$has_any_sports] + (1, 0)[$has_any_anime] + (1, 0)[$has_any_flat_folders] + (1, 0)[$sickbeard.USE_SUBTITLES])
#set $column_headers = [('false', False), ("'showNames'", False), ("'quality'", False),
((None, "'sports'")[$has_any_sports], True),
("'scene'", True), ((None, "'anime'")[$has_any_anime], True),
((None, "'flatfold'")[$has_any_flat_folders], True), ("'paused'", True),
("'status'", False), ('false', False), ('false', False), ('false', False),
((None, 'false')[$sickbeard.USE_SUBTITLES], False), ('false', False), ('false', False)]
#set $headers = []
#set $text_extract = []
#set $column = -1
#for $k, ($c, $img_extract) in enumerate($column_headers)
#if None is $c
#continue
#end if
#set $column += 1
$headers.append('\t\t\t%s: { sorter: %s }' % ($column, $c))
#if $img_extract
$text_extract.append('\t\t\t%s%s' % ($column, ": function(node) {return $(node).find('img').attr('alt')}"))
#end if
#end for
\$(document).ready(function()
{
\$('#massUpdateTable:has(tbody tr)').tablesorter({
widgets: ['zebra'],
sortList: [[1,0]],
headers: {
#echo ',\n'.join($headers)#
},
textExtraction: {
2: function(node) {return \$(node).find('span').text().toLowerCase()},
#echo ',\n'.join($text_extract)#
}
});
});
//-->
</script>
<script type="text/javascript" src="$sbRoot/js/massUpdate.js?$sbPID"></script>
#if $varExists('header')
#if $varExists('header')
<h1 class="header">$header</h1>
#else
#else
<h1 class="title">$title</h1>
#end if
<form name="massUpdateForm" method="post" action="massUpdate">
@ -82,113 +94,122 @@
<table id="massUpdateTable" class="sickbeardTable tablesorter" cellspacing="1" border="0" cellpadding="0">
<thead>
<tr>
<th class="col-checkbox">Edit<br/><input type="checkbox" class="bulkCheck" id="editCheck" /></th>
<th class="nowrap" style="text-align: left;">Show Name</th>
<th class="col-legend">Quality</th>
<th class="col-legend">Sports</th>
<th class="col-legend">Scene</th>
<th class="col-legend">Anime</th>
<th class="col-legend">Flat Folders</th>
<th class="col-legend">Paused</th>
<th class="col-legend">Status</th>
<th width="1%">Update<br/><input type="checkbox" class="bulkCheck" id="updateCheck" /></th>
<th width="1%">Rescan<br/><input type="checkbox" class="bulkCheck" id="refreshCheck" /></th>
<th width="1%">Rename<br/><input type="checkbox" class="bulkCheck" id="renameCheck" /></th>
#if $sickbeard.USE_SUBTITLES:
<th width="1%">Subtitle<br/><input type="checkbox" class="bulkCheck" id="subtitleCheck" /></th>
#end if
<!-- <th>Force Metadata Regen <input type="checkbox" class="bulkCheck" id="metadataCheck" /></th>//-->
<th width="1%">Delete<br/><input type="checkbox" class="bulkCheck" id="deleteCheck" /></th>
<th width="1%">Remove<br/><input type="checkbox" class="bulkCheck" id="removeCheck" /></th>
<th class="col-checkbox">Edit<br /><input type="checkbox" class="bulkCheck" id="editCheck"></th>
<th class="nowrap narrow" style="text-align:left">Show Name</th>
<th class="col-legend narrow">Quality</th>
#if $has_any_sports
<th class="col-legend narrow">Sports</th>
#end if
<th class="col-legend narrow">Scene</th>
#if $has_any_anime
<th class="col-legend narrow">Anime</th>
#end if
#if $has_any_flat_folders
<th class="col-legend narrow">Flat<br /> Folders</th>
#end if
<th class="col-legend narrow">Paused</th>
<th class="col-legend narrow">Status</th>
<th width="1%">Update<br /><input type="checkbox" class="bulkCheck" id="updateCheck"></th>
<th width="1%">Rescan<br /><input type="checkbox" class="bulkCheck" id="refreshCheck"></th>
<th width="1%">Rename<br /><input type="checkbox" class="bulkCheck" id="renameCheck"></th>
#if $sickbeard.USE_SUBTITLES
<th width="1%">Search<br />Subtitle<br /><input type="checkbox" class="bulkCheck" id="subtitleCheck"></th>
#end if
## <!-- <th>Force Metadata Regen <input type="checkbox" class="bulkCheck" id="metadataCheck"></th>//-->
<th width="1%">Delete<br /><input type="checkbox" class="bulkCheck" id="deleteCheck"></th>
<th width="1%">Remove<br /><input type="checkbox" class="bulkCheck" id="removeCheck"></th>
</tr>
</thead>
<tfoot>
<tr>
<td rowspan="1" colspan="2" class="align-center alt"><input class="btn pull-left" type="button" value="Edit Selected" id="submitMassEdit" /></td>
<td rowspan="1" colspan="#if $sickbeard.USE_SUBTITLES then 13 else 12#" class="align-right alt"><input class="btn pull-right" type="button" value="Submit" id="submitMassUpdate" /></td>
<td rowspan="1" colspan="2" class="align-center alt"><input class="btn pull-left" type="button" value="Edit Selected" id="submitMassEdit"></td>
<td rowspan="1" colspan="#echo $columns_total-2#" class="align-right alt"><input class="btn pull-right" type="button" value="Submit" id="submitMassUpdate"></td>
</tr>
</tfoot>
<tbody>
#set $myShowList = $sickbeard.showList
$myShowList.sort(lambda x, y: cmp(x.name, y.name))
#for $curShow in $myShowList:
#set $curEp = $curShow.nextaired
#set $curUpdate_disabled = ""
#set $curRefresh_disabled = ""
#set $curRename_disabled = ""
#set $curSubtitle_disabled = ""
#set $curDelete_disabled = ""
#set $curRemove_disabled = ""
#if $sickbeard.showQueueScheduler.action.isBeingUpdated($curShow) or $sickbeard.showQueueScheduler.action.isInUpdateQueue($curShow):
#set $curUpdate_disabled = "disabled=\"disabled\" "
#end if
#set $curUpdate = "<input type=\"checkbox\" class=\"updateCheck\" id=\"update-"+str($curShow.indexerid)+"\" "+$curUpdate_disabled+"/>"
#if $sickbeard.showQueueScheduler.action.isBeingRefreshed($curShow) or $sickbeard.showQueueScheduler.action.isInRefreshQueue($curShow):
#set $curRefresh_disabled = "disabled=\"disabled\" "
#end if
#set $curRefresh = "<input type=\"checkbox\" class=\"refreshCheck\" id=\"refresh-"+str($curShow.indexerid)+"\" "+$curRefresh_disabled+"/>"
#if $sickbeard.showQueueScheduler.action.isBeingRenamed($curShow) or $sickbeard.showQueueScheduler.action.isInRenameQueue($curShow):
#set $curRename = "disabled=\"disabled\" "
#end if
#set $curRename = "<input type=\"checkbox\" class=\"renameCheck\" id=\"rename-"+str($curShow.indexerid)+"\" "+$curRename_disabled+"/>"
#if not $curShow.subtitles or $sickbeard.showQueueScheduler.action.isBeingSubtitled($curShow) or $sickbeard.showQueueScheduler.action.isInSubtitleQueue($curShow):
#set $curSubtitle_disabled = "disabled=\"disabled\" "
#end if
#set $curSubtitle = "<input type=\"checkbox\" class=\"subtitleCheck\" id=\"subtitle-"+str($curShow.indexerid)+"\" "+$curSubtitle_disabled+"/>"
#if $sickbeard.showQueueScheduler.action.isBeingRenamed($curShow) or $sickbeard.showQueueScheduler.action.isInRenameQueue($curShow) or $sickbeard.showQueueScheduler.action.isInRefreshQueue($curShow):
#set $curDelete = "disabled=\"disabled\" "
#end if
#set $curDelete = "<input type=\"checkbox\" class=\"deleteCheck\" id=\"delete-"+str($curShow.indexerid)+"\" "+$curDelete_disabled+"/>"
#if $sickbeard.showQueueScheduler.action.isBeingRenamed($curShow) or $sickbeard.showQueueScheduler.action.isInRenameQueue($curShow) or $sickbeard.showQueueScheduler.action.isInRefreshQueue($curShow):
#set $curRemove = "disabled=\"disabled\" "
#end if
#set $curRemove = "<input type=\"checkbox\" class=\"removeCheck\" id=\"remove-"+str($curShow.indexerid)+"\" "+$curRemove_disabled+"/>"
#set $disabled = ' disabled="disabled"'
#set $disabled_inprogress_tip = ' title="%s action is currently in progress for this show"'
#set $disabled_subtitles_tip = ' title="Use edit to enable subtitle search for this show"'
#set $no = 'no16.png" title="No" alt="No'
#set $yes = 'yes16.png" title="Yes" alt="Yes'
#for $curShow in $myShowList
#set $option_state = '<input type="checkbox" class="%sCheck" id="%s-{0:s}"%s>'.format(str($curShow.indexerid))
#slurp
#set $curUpdate_disabled = $sickbeard.showQueueScheduler.action.isBeingUpdated($curShow)\
or $sickbeard.showQueueScheduler.action.isInUpdateQueue($curShow)
#set $reason = $disabled_inprogress_tip % 'Update'
#set $curUpdate = '%s>%s' % (('', $reason)[$curUpdate_disabled],
$option_state % ('update', 'update', ('', $disabled + $reason)[$curUpdate_disabled]))
#slurp
#set $curRefresh_disabled = $sickbeard.showQueueScheduler.action.isBeingRefreshed($curShow)\
or $sickbeard.showQueueScheduler.action.isInRefreshQueue($curShow)
#set $reason = $disabled_inprogress_tip % 'Rescan'
#set $curRefresh = '%s>%s' % (('', $reason)[$curRefresh_disabled],
$option_state % ('refresh', 'refresh', ('', $disabled + $reason)[$curRefresh_disabled]))
#slurp
#set $curRename_disabled = $sickbeard.showQueueScheduler.action.isBeingRenamed($curShow)\
or $sickbeard.showQueueScheduler.action.isInRenameQueue($curShow)
#set $reason = $disabled_inprogress_tip % 'Rename'
#set $curRename = '%s>%s' % (('', $reason)[$curRename_disabled],
$option_state % ('rename', 'rename', ('', $disabled + $reason)[$curRename_disabled]))
#slurp
#set $subtitles_disabled = not $curShow.subtitles\
or $sickbeard.showQueueScheduler.action.isBeingSubtitled($curShow)\
or $sickbeard.showQueueScheduler.action.isInSubtitleQueue($curShow)
#set $reason = ($disabled_inprogress_tip % 'Search subtitle', $disabled_subtitles_tip)[not $curShow.subtitles]
#set $curSubtitle = '%s>%s' % (('', $reason)[$subtitles_disabled],
$option_state % ('subtitle', 'subtitle', ('', $disabled + $reason)[$subtitles_disabled]))
#slurp
#set $curDelete_disabled = $sickbeard.showQueueScheduler.action.isBeingRenamed($curShow)\
or $sickbeard.showQueueScheduler.action.isInRenameQueue($curShow)\
or $sickbeard.showQueueScheduler.action.isInRefreshQueue($curShow)
#set $reason = $disabled_inprogress_tip % 'Rename or rescan'
#set $curDelete = '%s>%s' % (('', $reason)[$curDelete_disabled],
$option_state % ('delete', 'delete', ('', $disabled + $reason)[$curDelete_disabled]))
#slurp
#set $curRemove_disabled = $sickbeard.showQueueScheduler.action.isBeingRenamed($curShow)\
or $sickbeard.showQueueScheduler.action.isInRenameQueue($curShow)\
or $sickbeard.showQueueScheduler.action.isInRefreshQueue($curShow)
##set $reason = $disabled_inprogress_tip % 'Rename or rescan'
#set $curRemove = '%s>%s' % (('', $reason)[$curRemove_disabled],
$option_state % ('remove', 'remove', ('', $disabled + $reason)[$curRemove_disabled]))
<tr>
<td align="center"><input type="checkbox" class="editCheck" id="edit-$curShow.indexerid" /></td>
<td align="center"><input type="checkbox" class="editCheck" id="edit-$curShow.indexerid"></td>
<td class="tvShow"><a href="$sbRoot/home/displayShow?show=$curShow.indexerid">$curShow.name</a></td>
#if $curShow.quality in $qualityPresets:
#if $curShow.quality in $qualityPresets
<td align="center"><span class="quality $qualityPresetStrings[$curShow.quality]">$qualityPresetStrings[$curShow.quality]</span></td>
#else:
#else
<td align="center"><span class="quality Custom">Custom</span></td>
#end if
<td align="center"><img src="$sbRoot/images/#if int($curShow.is_sports) == 1 then "yes16.png\" alt=\"Y\"" else "no16.png\" alt=\"N\""# width="16" height="16" /></td>
<td align="center"><img src="$sbRoot/images/#if int($curShow.is_scene) == 1 then "yes16.png\" alt=\"Y\"" else "no16.png\" alt=\"N\""# width="16" height="16" /></td>
<td align="center"><img src="$sbRoot/images/#if int($curShow.is_anime) == 1 then "yes16.png\" alt=\"Y\"" else "no16.png\" alt=\"N\""# width="16" height="16" /></td>
<td align="center"><img src="$sbRoot/images/#if int($curShow.flatten_folders) == 1 then "yes16.png\" alt=\"Y\"" else "no16.png\" alt=\"N\""# width="16" height="16" /></td>
<td align="center"><img src="$sbRoot/images/#if int($curShow.paused) == 1 then "yes16.png\" alt=\"Y\"" else "no16.png\" alt=\"N\""# width="16" height="16" /></td>
#end if
#if $has_any_sports
<td align="center"><img src="$sbRoot/images/#if 1 == int($curShow.is_sports) then $yes else $no#" width="16" height="16" /></td>
#end if
<td align="center"><img src="$sbRoot/images/#if 1 == int($curShow.is_scene) then $yes else $no#" width="16" height="16" /></td>
#if $has_any_anime
<td align="center"><img src="$sbRoot/images/#if 1 == int($curShow.is_anime) then $yes else $no#" width="16" height="16" /></td>
#end if
#if $has_any_flat_folders
<td align="center"><img src="$sbRoot/images/#if 1 == int($curShow.flatten_folders) then $yes else $no#" width="16" height="16" /></td>
#end if
<td align="center"><img src="$sbRoot/images/#if 1 == int($curShow.paused) then $yes else $no#" width="16" height="16" /></td>
<td align="center">$curShow.status</td>
<td align="center">$curUpdate</td>
<td align="center">$curRefresh</td>
<td align="center">$curRename</td>
#if $sickbeard.USE_SUBTITLES:
<td align="center">$curSubtitle</td>
#end if
<td align="center">$curDelete</td>
<td align="center">$curRemove</td>
<td align="center"$curUpdate</td>
<td align="center"$curRefresh</td>
<td align="center"$curRename</td>
#if $sickbeard.USE_SUBTITLES
<td align="center"$curSubtitle</td>
#end if
<td align="center"$curDelete</td>
<td align="center"$curRemove</td>
</tr>
#end for
#end for
</tbody>
</table>
</form>
#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.tmpl')

View file

@ -1,187 +1,184 @@
#import sickbeard
#from sickbeard import common
#from sickbeard import exceptions
#set global $title="Mass Edit"
#set global $header="Mass Edit"
#set global $title = 'Mass Edit'
#set global $header = 'Mass Edit'
#set global $sbPath=".."
#set global $sbPath = '..'
#set global $topmenu="manage"#
#set global $topmenu = 'manage'#
#import os.path
#include $os.path.join($sickbeard.PROG_DIR, "gui/slick/interfaces/default/inc_top.tmpl")
#if $quality_value != None:
#set $initial_quality = int($quality_value)
#include $os.path.join($sickbeard.PROG_DIR, 'gui/slick/interfaces/default/inc_top.tmpl')
#if None is not $quality_value:
#set $initial_quality = int($quality_value)
#else:
#set $initial_quality = $common.SD
#set $initial_quality = $common.SD
#end if
#set $anyQualities, $bestQualities = $common.Quality.splitQuality($initial_quality)
<script type="text/javascript" src="$sbRoot/js/qualityChooser.js?$sbPID"></script>
<script type="text/javascript" src="$sbRoot/js/massEdit.js?$sbPID"></script>
<form action="massEditSubmit" method="post">
<input type="hidden" name="toEdit" value="$showList" />
<input type="hidden" name="toEdit" value="$showList">
<div class="optionWrapper">
<span class="selectTitle">Root Directories <span class="separator">*</span></span><br />
#for $cur_dir in $root_dir_list:
#set $cur_index = $root_dir_list.index($cur_dir)
<div>
<input class="btn edit_root_dir" type="button" class="edit_root_dir" id="edit_root_dir_$cur_index" value="Edit" />
<input class="btn delete_root_dir" type="button" class="delete_root_dir" id="delete_root_dir_$cur_index" value="Delete" />
$cur_dir => <span id="display_new_root_dir_$cur_index">$cur_dir</span>
</div>
<input type="hidden" name="orig_root_dir_$cur_index" value="$cur_dir" />
<input type="text" style="display: none" name="new_root_dir_$cur_index" id="new_root_dir_$cur_index" class="new_root_dir" value="$cur_dir" />
#end for
<div class="optionWrapper">
<span class="selectTitle">Parent folder <span class="separator">*</span></span><br />
#set $selected = 'selected="selected"'
#for $cur_dir in $root_dir_list:
#set $cur_index = $root_dir_list.index($cur_dir)
<div>
<input class="btn edit_root_dir" type="button" class="edit_root_dir" id="edit_root_dir_$cur_index" value="Edit">
<input class="btn delete_root_dir" type="button" class="delete_root_dir" id="delete_root_dir_$cur_index" value="Delete">
$cur_dir => <span id="display_new_root_dir_$cur_index">$cur_dir</span>
</div>
<input type="hidden" name="orig_root_dir_$cur_index" value="$cur_dir">
<input type="text" style="display:none" name="new_root_dir_$cur_index" id="new_root_dir_$cur_index" class="new_root_dir" value="$cur_dir">
#end for
</div>
</div>
<div class="optionWrapper">
<span class="selectTitle">Paused</span>
<div class="selectChoices">
<select id="edit_paused" name="paused" class="form-control form-control-inline input-sm">
<option value="keep">&lt; keep &gt;</option>
<option value="enable" #if $paused_value then $selected else ''#>enable</option>
<option value="disable" #if $paused_value == False then $selected else ''#>disable</option>
</select>
</div><br />
</div>
<div class="optionWrapper">
<span class="selectTitle">Quality</span>
<div class="selectChoices">
<select id="qualityPreset" name="quality_preset" class="form-control form-control-inline input-sm">
<option value="keep">&lt; keep &gt;</option>
#set $selected = None
<option value="0" #if $quality_value != None and $quality_value not in $common.qualityPresets then "selected=\"selected\"" else ""#>Custom</option>
#for $curPreset in sorted($common.qualityPresets):
<option value="$curPreset" #if $quality_value == $curPreset then "selected=\"selected\"" else ""#>$common.qualityPresetStrings[$curPreset]</option>
#end for
</select>
</div><br />
<div class="optionWrapper">
<span class="selectTitle">Quality</span>
<div class="selectChoices">
<select id="qualityPreset" name="quality_preset" class="form-control form-control-inline input-sm">
<option value="keep">&lt; keep &gt;</option>
<option value="0" #if None is not $quality_value and $quality_value not in $common.qualityPresets then $selected else ''#>Custom</option>
#for $curPreset in sorted($common.qualityPresets):
<option value="$curPreset" #if $quality_value == $curPreset then $selected else ''#>$common.qualityPresetStrings[$curPreset]</option>
#end for
</select>
</div><br />
<div id="customQuality">
<div class="manageCustom pull-left">
<h4>Inital</h4>
#set $anyQualityList = filter(lambda x: x > $common.Quality.NONE, $common.Quality.qualityStrings)
<select id="anyQualities" name="anyQualities" multiple="multiple" size="len($anyQualityList)">
#for $curQuality in sorted($anyQualityList):
<option value="$curQuality" #if $curQuality in $anyQualities then "selected=\"selected\"" else ""#>$common.Quality.qualityStrings[$curQuality]</option>
#end for
</select>
</div>
<div class="manageCustom pull-left">
<h4>Archive</h4>
#set $bestQualityList = filter(lambda x: x > $common.Quality.SDTV, $common.Quality.qualityStrings)
<select id="bestQualities" name="bestQualities" multiple="multiple" size="len($bestQualityList)">
#for $curQuality in sorted($bestQualityList):
<option value="$curQuality" #if $curQuality in $bestQualities then "selected=\"selected\"" else ""#>$common.Quality.qualityStrings[$curQuality]</option>
#end for
</select>
</div>
<br />
</div>
</div>
<div id="customQuality">
<div class="manageCustom pull-left">
<h4>Inital</h4>
#set $anyQualityList = filter(lambda x: x > $common.Quality.NONE, $common.Quality.qualityStrings)
<select id="anyQualities" name="anyQualities" multiple="multiple" size="len($anyQualityList)">
#for $curQuality in sorted($anyQualityList):
<option value="$curQuality" #if $curQuality in $anyQualities then $selected else ''#>$common.Quality.qualityStrings[$curQuality]</option>
#end for
</select>
</div>
<div class="manageCustom pull-left">
<h4>Archive</h4>
#set $bestQualityList = filter(lambda x: x > $common.Quality.SDTV, $common.Quality.qualityStrings)
<select id="bestQualities" name="bestQualities" multiple="multiple" size="len($bestQualityList)">
#for $curQuality in sorted($bestQualityList):
<option value="$curQuality" #if $curQuality in $bestQualities then $selected else ''#>$common.Quality.qualityStrings[$curQuality]</option>
#end for
</select>
</div><br />
</div>
</div>
#if $anyQualities + $bestQualities:
#set $isSelected = ' selected="selected"'
#set $isEnabled = $isSelected
#set $isDisabled = $isSelected
#if $archive_firstmatch_value##set $isDisabled = ''##else##set $isEnabled = ''##end if#
<div class="optionWrapper clearfix">
<span class="selectTitle">Archive on first match</span>
<div class="selectChoices">
<select id="edit_archive_firstmatch" name="archive_firstmatch" class="form-control form-control-inline input-sm">
<option value="keep">&lt; keep &gt;</option>
<option value="enable"${isEnabled}>enable</option>
<option value="disable"${isDisabled}>disable</option>
</select>
</div>
</div>
#set $isSelected = ' selected="selected"'
#set $isEnabled = $isSelected
#set $isDisabled = $isSelected
#if $archive_firstmatch_value##set $isDisabled = ''##else##set $isEnabled = ''##end if#
<div class="optionWrapper clearfix">
<span class="selectTitle">Archive on first match</span>
<div class="selectChoices">
<select id="edit_archive_firstmatch" name="archive_firstmatch" class="form-control form-control-inline input-sm">
<option value="keep">&lt; keep &gt;</option>
<option value="enable"${isEnabled}>enable</option>
<option value="disable"${isDisabled}>disable</option>
</select>
</div>
</div>
#end if
<div class="optionWrapper clearfix">
<span class="selectTitle">Flatten Folders <span class="separator">*</span></span>
<div class="selectChoices">
<select id="edit_flatten_folders" name="flatten_folders" class="form-control form-control-inline input-sm">
<option value="keep">&lt; keep &gt;</option>
<option value="enable" #if $flatten_folders_value then "selected=\"selected\"" else ""#>enable</option>
<option value="disable" #if $flatten_folders_value == False then "selected=\"selected\"" else ""#>disable</option>
</select>
</div>
</div>
<div class="optionWrapper clearfix">
<span class="selectTitle">Flat folder structure <span class="separator">*</span></span>
<div class="selectChoices">
<select id="edit_flatten_folders" name="flatten_folders" class="form-control form-control-inline input-sm">
<option value="keep">&lt; keep &gt;</option>
<option value="enable" #if $flatten_folders_value then $selected else ''#>enable</option>
<option value="disable" #if $flatten_folders_value == False then $selected else ''#>disable</option>
</select>
</div>
</div>
<div class="optionWrapper">
<span class="selectTitle">Paused</span>
<div class="selectChoices">
<select id="edit_paused" name="paused" class="form-control form-control-inline input-sm">
<option value="keep">&lt; keep &gt;</option>
<option value="enable" #if $paused_value then "selected=\"selected\"" else ""#>enable</option>
<option value="disable" #if $paused_value == False then "selected=\"selected\"" else ""#>disable</option>
</select>
</div><br />
</div>
<div class="optionWrapper">
<span class="selectTitle">Air by date episode names</span>
<div class="selectChoices">
<select id="edit_air_by_date" name="air_by_date" class="form-control form-control-inline input-sm">
<option value="keep">&lt; keep &gt;</option>
<option value="enable" #if $air_by_date_value then $selected else ''#>enable</option>
<option value="disable" #if $air_by_date_value == False then $selected else ''#>disable</option>
</select>
</div><br />
</div>
<div class="optionWrapper">
<span class="selectTitle">Scene Numbering</span>
<div class="selectChoices">
<select id="edit_scene" name="scene" class="form-control form-control-inline input-sm">
<option value="keep">&lt; keep &gt;</option>
<option value="enable" #if $scene_value then "selected=\"selected\"" else ""#>enable</option>
<option value="disable" #if $scene_value == False then "selected=\"selected\"" else ""#>disable</option>
</select>
</div><br />
</div>
<div class="optionWrapper">
<span class="selectTitle">Scene numbering</span>
<div class="selectChoices">
<select id="edit_scene" name="scene" class="form-control form-control-inline input-sm">
<option value="keep">&lt; keep &gt;</option>
<option value="enable" #if $scene_value then $selected else ''#>enable</option>
<option value="disable" #if $scene_value == False then $selected else ''#>disable</option>
</select>
</div><br />
</div>
<div class="optionWrapper">
<span class="selectTitle">Anime</span>
<div class="selectChoices">
<select id="edit_anime" name="anime" class="form-control form-control-inline input-sm">
<option value="keep">&lt; keep &gt;</option>
<option value="enable" #if $anime_value then "selected=\"selected\"" else ""#>enable</option>
<option value="disable" #if $anime_value == False then "selected=\"selected\"" else ""#>disable</option>
</select>
</div><br />
</div>
<div class="optionWrapper">
<span class="selectTitle">Subtitles<span class="separator"></span></span>
<div class="selectChoices">
<select id="edit_subtitles" name="subtitles" class="form-control form-control-inline input-sm">
<option value="keep">&lt; keep &gt;</option>
<option value="enable" #if $subtitles_value then $selected else ''#>enable</option>
<option value="disable" #if $subtitles_value == False then $selected else ''#>disable</option>
</select>
</div><br />
</div>
<div class="optionWrapper">
<span class="selectTitle">Sports</span>
<div class="selectChoices">
<select id="edit_sports" name="sports" class="form-control form-control-inline input-sm">
<option value="keep">&lt; keep &gt;</option>
<option value="enable" #if $sports_value then "selected=\"selected\"" else ""#>enable</option>
<option value="disable" #if $sports_value == False then "selected=\"selected\"" else ""#>disable</option>
</select>
</div><br />
</div>
<div class="optionWrapper">
<span class="selectTitle">Show is sports</span>
<div class="selectChoices">
<select id="edit_sports" name="sports" class="form-control form-control-inline input-sm">
<option value="keep">&lt; keep &gt;</option>
<option value="enable" #if $sports_value then $selected else ''#>enable</option>
<option value="disable" #if $sports_value == False then $selected else ''#>disable</option>
</select>
</div><br />
</div>
<div class="optionWrapper">
<span class="selectTitle">Air-By-Date</span>
<div class="selectChoices">
<select id="edit_air_by_date" name="air_by_date" class="form-control form-control-inline input-sm">
<option value="keep">&lt; keep &gt;</option>
<option value="enable" #if $air_by_date_value then "selected=\"selected\"" else ""#>enable</option>
<option value="disable" #if $air_by_date_value == False then "selected=\"selected\"" else ""#>disable</option>
</select>
</div><br />
</div>
<div class="optionWrapper">
<span class="selectTitle">Show is anime</span>
<div class="selectChoices">
<select id="edit_anime" name="anime" class="form-control form-control-inline input-sm">
<option value="keep">&lt; keep &gt;</option>
<option value="enable" #if $anime_value then $selected else ''#>enable</option>
<option value="disable" #if $anime_value == False then $selected else ''#>disable</option>
</select>
</div><br />
</div>
<div class="optionWrapper">
<span class="selectTitle">Subtitles<span class="separator"></span></span>
<div class="selectChoices">
<select id="edit_subtitles" name="subtitles" class="form-control form-control-inline input-sm">
<option value="keep">&lt; keep &gt;</option>
<option value="enable" #if $subtitles_value then "selected=\"selected\"" else ""#>enable</option>
<option value="disable" #if $subtitles_value == False then "selected=\"selected\"" else ""#>disable</option>
</select>
</div><br />
</div>
<div class="optionWrapper">
<br /><span class="separator" style="font-size: 1.2em; font-weight: 700;">*</span>
Changing these settings will cause the selected shows to be refreshed.
</div>
<div class="optionWrapper" style="text-align: center;">
<input type="submit" value="Submit" class="btn" /><br />
</div>
<div class="optionWrapper" style="font-size:13px;margin-top:15px">
<span class="separator" style="font-size:1.2em; font-weight:700">*</span>
Changing these settings will cause selected shows to be refreshed
</div>
<div class="optionWrapper" style="text-align:center">
<input type="submit" value="Submit" class="btn"><br />
</div>
</form>
<br />
<script type="text/javascript" charset="utf-8">
<!--
jQuery('#location').fileBrowser({ title: 'Select Show Location' });
jQuery('#location').fileBrowser({ title:'Select Show Location' });
//-->
</script>
#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.tmpl')