#import sickgear #from sickgear.helpers import anon_url ## #set global $header = ('Add from TV info source', '%s::%s' % ($kwargs.get('action'), $default_show_name))[any([$kwargs.get('action')])] #set global $title = ('Add from TV info source', '%s::%s' % ($kwargs.get('action'), $default_show_name))[any([$kwargs.get('action')])] #set global $sbPath = '../..' #set global $statpath = '../..' #set global $topmenu = 'home' <% def sg_var(varname, default=False): return getattr(sickgear, varname, default) %>#slurp# <% def sg_str(varname, default=''): return getattr(sickgear, varname, default) %>#slurp# ########## ## legacy #set $provided_tvid = $getVar('provided_tvid', $getVar('provided_indexer', 1)) #set $provided_prodid = $getVar('provided_prodid', None) or $getVar('provided_indexer_id', 0) #set $provided_show_name = $getVar('provided_show_name', None) or $getVar('provided_indexer_name', '') ## #import os.path #include $os.path.join($sg_str('PROG_DIR'), 'gui/slick/interfaces/default/inc_top.tmpl') #set indexer_count = len([$i for $i in $sickgear.TVInfoAPI().sources if $sickgear.TVInfoAPI(i).config.get('active', False) and not $sickgear.TVInfoAPI(i).config.get('defunct', False)]) + 1 #if $varExists('header')