#if $sickgear.IGNORE_WORDS:
#end if
#if $sickgear.REQUIRE_WORDS:
#end if
#set $qualities = $common.Quality.split_quality(int($show_obj.quality))
#set global $any_qualities = $qualities[0]
#set global $best_qualities = $qualities[1]
#include $os.path.join($sg_str('PROG_DIR'), 'gui/slick/interfaces/default/inc_qualityChooser.tmpl')
#if $show_obj.is_anime
#import sickgear.anime
#include $os.path.join($sg_str('PROG_DIR'), 'gui/slick/interfaces/default/inc_anigrouplists.tmpl')
#end if
#set $dev = True
#set $dev = None
#set $is_main_settable = False | $unlock_main_id
#for $tvid, $src_name in iteritems($sickgear.TVInfoAPI().all_sources)
#set $is_main_settable |= ($dev or
($tvid != $show_obj.tvid and $show_obj.ids[$tvid].get('id', 0) > 0 and
$tvid in $sickgear.TVInfoAPI().sources and not $sickgear.TVInfoAPI($tvid).config.get('defunct') and
$sickgear.TVInfoAPI($tvid).config.get('active')))
#if $is_main_settable
#break
#end if
#end for
#set $search_name = quote_plus($sickgear.indexermapper.clean_show_name($show_obj.name))
#for $tvid, $src_name in iteritems($sickgear.TVInfoAPI().all_sources)
#set $ok_tvid = $show_obj.ids[$tvid].get('id', 0) > 0
#set $maybe_main = ($tvid != $show_obj.tvid and
$tvid in $sickgear.TVInfoAPI().sources and not $sickgear.TVInfoAPI($tvid).config.get('defunct') and
$sickgear.TVInfoAPI($tvid).config.get('active'))
#set $settable_main = ($dev or ($ok_tvid and $maybe_main))
#end for