#import sickbeard
#from sickbeard.common import Quality, qualityPresets, qualityPresetStrings
#set $html_selected = ' selected="selected"'
An Initial quality episode must be found before an Upgrade to selection is considered.
Upgrades continue until the highest selected of Upgrade to is matched.
Initial
#set $anyQualityList = filter(lambda x: x > $Quality.NONE, $Quality.qualityStrings)
Upgrade to
#set $bestQualityList = filter(lambda x: x > $Quality.SDTV and x < $Quality.UNKNOWN, $Quality.qualityStrings)