SickGear/gui/slick/interfaces/default/inc_qualityChooser.tmpl

50 lines
2.2 KiB
Cheetah
Raw Normal View History

#import sickbeard
#from sickbeard.common import Quality, qualityPresets, qualityPresetStrings
<div class="field-pair">
2014-11-20 22:25:33 +00:00
<label for="qualityPreset" class="clearfix">
#set $overall_quality = $Quality.combineQualities($anyQualities, $bestQualities)
2014-11-20 22:25:33 +00:00
<span class="component-title input">Quality</span>
<span class="component-desc">
#set $selected = None
2014-11-20 22:25:33 +00:00
<select id="qualityPreset" class="form-control form-control-inline input-sm">
<option value="0">Custom</option>
#for $curPreset in sorted($qualityPresets):
2014-11-20 22:25:33 +00:00
<option value="$curPreset" #if $curPreset == $overall_quality then "selected=\"selected\"" else ""# #if $qualityPresetStrings[$curPreset].endswith("0p") then "style=\"padding-left: 15px;\"" else ""#>$qualityPresetStrings[$curPreset]</option>
#end for
2014-11-20 22:25:33 +00:00
</select>
<span>preferred episode quality to download</span>
</span>
</label>
</div>
<div id="customQualityWrapper">
<div id="customQuality" class="show-if-quality-custom">
2014-11-20 22:25:33 +00:00
<div class="component-group-desc">
<p>An <em>Initial</em> quality episode must be found before an <em>Upgrade to</em> selection is considered.</p>
2014-11-20 22:25:33 +00:00
</div>
2014-11-20 22:25:33 +00:00
<span class="component-desc">
<div style="float:left; padding-right: 40px">
<h4 class="jumbo">Initial</h4>
2014-11-20 22:25:33 +00:00
#set $anyQualityList = filter(lambda x: x > $Quality.NONE, $Quality.qualityStrings)
<select id="anyQualities" name="anyQualities" multiple="multiple" size="$len($anyQualityList)" class="form-control form-control-inline input-sm">
#for $curQuality in sorted($anyQualityList):
<option value="$curQuality" #if $curQuality in $anyQualities then "selected=\"selected\"" else ""#>$Quality.qualityStrings[$curQuality]</option>
#end for
</select>
</div>
2014-11-20 22:25:33 +00:00
<div style="float:left">
<h4 class="jumbo">Upgrade to</h4>
2014-11-20 22:25:33 +00:00
#set $bestQualityList = filter(lambda x: x > $Quality.SDTV and x < $Quality.UNKNOWN, $Quality.qualityStrings)
<select id="bestQualities" name="bestQualities" multiple="multiple" size="$len($bestQualityList)" class="form-control form-control-inline input-sm">
#for $curQuality in sorted($bestQualityList):
<option value="$curQuality" #if $curQuality in $bestQualities then "selected=\"selected\"" else ""#>$Quality.qualityStrings[$curQuality]</option>
#end for
</select>
</div>
</span>
</div>
</div>