SickGear/gui/slick/interfaces/default/inc_qualityChooser.tmpl
JackDandy 32987134ba Change codebase cleanups.
Cleanup most init warnings.
Cleanup some vars, pythonic instead of js.
Some typos and python var/func names for Scheduler.
Remove legacy handlers deprecated in 2020.
Remove some legacy tagged stuff.
Cleanup ConfigParser and 23.py
Change cleanup vendored scandir.
Remove redundant pkg_resources.py in favour of the vendor folder.
Remove backports.
Remove trakt checker.
Change remove redundant WindowsSelectorEventLoopPolicy from webserveInit.
Cleanup varnames and providers
Various minor tidy ups to remove ide warnings.
2023-02-24 15:17:56 +00:00

107 lines
5.3 KiB
Cheetah

#import sickgear
#from sickgear.common import Quality, qualityPresets, qualityPresetStrings
##
#set $html_checked = ' checked="checked"'
#set $html_selected = ' selected="selected"'
<div class="field-pair">
<label for="quality-preset" class="clearfix">
#set $overall_quality = $Quality.combine_qualities($any_qualities, $best_qualities)
<span class="component-title input">Quality to download</span>
<span class="component-desc">
#set $selected = None
<select id="quality-preset" name="quality_preset" class="form-control form-control-inline input-sm">
<option value="0">Custom</option>
#for $cur_preset in $qualityPresets:
<option value="$cur_preset"#echo ('', $html_selected)[$cur_preset == $overall_quality]##echo ('>', '>... ')[$qualityPresetStrings[$cur_preset].endswith('0p') and 'UHD' not in $qualityPresetStrings[$cur_preset]]#$qualityPresetStrings[$cur_preset]</option>
#end for
</select>
<span>tip: select a quality then "Custom" for a default selection</span>
</span>
</label>
</div>
<div id="custom-quality-wrapper">
<div id="custom-quality" class="show-if-quality-custom" style="display:none">
<div class="field-pair">
<div class="component-group-desc tip-text">
<p style="margin-bottom:25px">Wanted quality</p>
<p id="unknown-quality" style="display:none">
<em class="red-text">Briefly use</em> <em class="highlight-text">'Unknown'</em> to skip release quality checks
but expect spam if left on
</p>
</div>
<span id="wanted-quality" class="component-desc">
<p>select one or more qualities; the best one found when searching will be used</p>
#set $any_quality_list = list(filter(lambda x: x > $Quality.NONE and x < $Quality.UNKNOWN, $Quality.qualityStrings))
#set $has_unknown = False
#for $cur_quality in sorted($any_quality_list):
##set $has_unknown |= ($Quality.UNKNOWN == $cur_quality and $cur_quality in $any_qualities)
<a href="#" data-quality="$cur_quality" class="btn btn-inverse dark-bg#echo ('', ' active')[$cur_quality in $any_qualities]#" role="button"><i class="icon-glyph searchadd"></i>$Quality.get_quality_ui($cur_quality)</a>
#if $Quality.UHD4KWEB == $cur_quality
<span class="btn-placeholder"></span>
<span class="btn-placeholder"></span>
<a href="#" data-quality="$Quality.UNKNOWN" class="btn btn-inverse dark-bg#echo ('', ' active')[$Quality.UNKNOWN in $any_qualities]#" role="button"><i class="icon-glyph searchadd"></i>$Quality.get_quality_ui($Quality.UNKNOWN)</a>
#end if
#if $cur_quality in [$Quality.SDDVD, $Quality.FULLHDTV, $Quality.FULLHDBLURAY, $Quality.UHD4KWEB]
<br>
#end if
#end for
</span>
</div>
<div class="field-pair" style="clear:both">
<div class="component-group-desc tip-text">
<p style="margin-bottom:25px">All selected qualities found will upgrade until the best</p>
<p id="no-upgrade" style="display:none">With no upgrades selected, search is complete when a <em class="highlight-text">wanted quality</em> is found</p>
<p id="upgrade-cond" style="display:none">Upgrades will search <em class="highlight-text">after</em> a wanted quality release is snatched or downloaded</p>
</div>
<span id="upgrade-quality" class="component-desc">
<p>optional, upgrade existing media to any selected quality</p>
#set $best_quality_list = list(filter(lambda x: x > $Quality.SDTV and x < $Quality.UNKNOWN, $Quality.qualityStrings))
#for $cur_quality in sorted($best_quality_list):
<a href="#" data-quality="$cur_quality" class="btn btn-inverse dark-bg#echo ('', ' active')[$cur_quality in $best_qualities]#" role="button"><i class="icon-glyph searchadd"></i>$Quality.get_quality_ui($cur_quality)</a>
#if $cur_quality in [$Quality.SDDVD, $Quality.FULLHDTV, $Quality.FULLHDBLURAY]
<br>
#end if
#end for
</span>
</div>
<div class="field-pair" id="upgrade-once-opt" style="display:none">
<label for="upgrade-once">
<span class="component-title">Upgrade once</span>
<span class="component-desc">
<input type="checkbox" name="upgrade_once" id="upgrade-once"#echo ('', $html_checked)[$varExists('show_obj') and $show_obj.upgrade_once]#>
<p>stop upgrading after matching the first best <em>upgrade</em> quality</p>
</span>
</label>
</div>
<span class="component-desc bfr">
<div style="float:left;padding-right:28px">
<h4 class="jumbo">Wanted</h4>
#set $any_quality_list = list(filter(lambda x: x > $Quality.NONE, $Quality.qualityStrings))
<select id="wanted-qualities" name="any_qualities" multiple="multiple" size="$len($any_quality_list)" class="form-control form-control-inline input-sm">
#for $cur_quality in sorted($any_quality_list):
<option value="$cur_quality"#echo ('', $html_selected)[$cur_quality in $any_qualities]#>$Quality.get_quality_ui($cur_quality)</option>
#end for
</select>
</div>
<div style="float:left;padding-right:20px">
<h4 class="jumbo">Upgrade to</h4>
#set $best_quality_list = list(filter(lambda x: x > $Quality.SDTV and x < $Quality.UNKNOWN, $Quality.qualityStrings))
<select id="upgrade-qualities" name="best_qualities" multiple="multiple" size="$len($best_quality_list)" class="form-control form-control-inline input-sm">
#for $cur_quality in sorted($best_quality_list):
<option value="$cur_quality"#echo ('', $html_selected)[$cur_quality in $best_qualities]#>$Quality.get_quality_ui($cur_quality)</option>
#end for
</select><br />
</div>
</span>
</div>
</div>