#import sickgear #import datetime #from sickgear import network_timezones, WEB_ROOT, THEME_NAME #from sickgear.common import * #from sickgear.sgdatetime import SGDatetime <% def sg_var(varname, default=False): return getattr(sickgear, varname, default) %>#slurp# <% def sg_str(varname, default=''): return getattr(sickgear, varname, default) %>#slurp# ## #set global $title = 'Home' #set global $header = 'Show List' #set global $sbPath = '..' #set global $topmenu = 'home' #set global $page_body_attr = 'show-list' #set fuzzydate = 'airdate' #set sg_root = $getVar('sbRoot', WEB_ROOT) ## #import os.path #include $os.path.join($sg_str('PROG_DIR'), 'gui/slick/interfaces/default/inc_top.tmpl')

$showlists[0][1]

#set $tab = 1 #set $selected = ' selected="selected"' #if 'poster' == $layout
Sort By: Sort Order: Layout: #else Layout: #end if #if 'poster' == $layout
#end if
 
## #set $poster_id = 0 #set $load_normal = 0 #for $cur_showlist in $showlists #set $cur_list_id = $cur_showlist[0] #set $cur_list_name = $cur_showlist[1] #set $showlist = $list($cur_showlist[2]) #if $cur_showlist != $showlists[0] ##

$cur_list_name

#end if ## #if 'poster' == $layout ##
## #for $curLoadingShow in $sickgear.show_queue_scheduler.action.loading_showlist ## #if $curLoadingShow.show_obj != None and $curLoadingShow.show_obj in $sg_str('showList') #continue #end if ## #if None is $curLoadingShow.show_obj ##
Loading... ($curLoadingShow.show_name)
## #end if ## #end for ## $showlist.sort(key=lambda _x: _x.name) #for $cur_show_obj in $showlist ## #set $cur_airs_next = '' #set $cur_snatched = 0 #set $cur_downloaded = 0 #set $cur_total = 0 #set $download_stat_tip = '' #set $display_status = $cur_show_obj.status #set $show_name = getattr($cur_show_obj, 'unique_name', $cur_show_obj.name) #set $display_name = (re.sub(r'^((?:A(?!\s+to)n?)|The)\s(\w)', r'\1 \2', $show_name), $show_name)[$sg_var('SORT_ARTICLE')] #set $poster_id += 1 #if None is not $display_status #if re.search(r'(?i)(?:(?:new|returning)\s*series|upcoming)', $cur_show_obj.status) #set $display_status = 'Continuing' #else if re.search(r'(?i)(?:nded)', $cur_show_obj.status) #set $display_status = 'Ended' #end if #end if ## #if $cur_show_obj.tvid_prodid in $show_stat #set $cur_airs_next = $show_stat[$cur_show_obj.tvid_prodid]['ep_airs_next'] ## #set $cur_snatched = $show_stat[$cur_show_obj.tvid_prodid]['ep_snatched'] #if not $cur_snatched #set $cur_snatched = 0 #end if ## #set $cur_downloaded = $show_stat[$cur_show_obj.tvid_prodid]['ep_downloaded'] #if not $cur_downloaded #set $cur_downloaded = 0 #end if ## #set $cur_total = $show_stat[$cur_show_obj.tvid_prodid]['ep_total'] #if not $cur_total #set $cur_total = 0 #end if #end if ## #if $cur_total != 0 #set $download_stat = str($cur_downloaded) #set $download_stat_tip = 'Downloaded: ' + str($cur_downloaded) #if $cur_snatched > 0 #set $download_stat = '%s+%s' % ($download_stat, $sg_root, $cur_snatched) #set $download_stat_tip = download_stat_tip + ' ' + 'Snatched: ' + str($cur_snatched) #end if #set $download_stat = download_stat + ' / ' + str($cur_total) #set $download_stat_tip = download_stat_tip + ' ' + 'Total: ' + str($cur_total) #else #set $download_stat = '?' #set $download_stat_tip = 'no data' #end if ## #set $nom = $cur_downloaded #set $den = $cur_total #if $den == 0 #set $den = 1 #end if ## #set $progressbar_percent = $nom * 100 / $den ## #set $data_date = '600000000000' #if $cur_airs_next #set $data_date = $SGDatetime.convert_to_setting($network_timezones.parse_date_time($cur_airs_next, $cur_show_obj.airs, $cur_show_obj.network)).strftime('%Y%m%d%H%M') #else if None is not $display_status #if 'nded' not in $display_status and 1 == int($cur_show_obj.paused) #set $data_date = '500000000500' #else if 'ontinu' in $display_status #set $data_date = '500000000000' #else if 'nded' in $display_status #set $data_date = '500000000100' #end if #end if ##
$display_name
#if $cur_airs_next #set $ldatetime = $SGDatetime.convert_to_setting($network_timezones.parse_date_time($cur_airs_next,$cur_show_obj.airs,$cur_show_obj.network)) $SGDatetime.sbfdate($ldatetime) #else #set $output_html = '?' #if None is not $display_status #if 'nded' not in $display_status and 1 == int($cur_show_obj.paused) #set $output_html = 'Paused' #else if $display_status #set $output_html = $display_status #end if #end if $output_html #end if
$download_stat #if 'simple' == $layout $cur_show_obj.network #else #set $img_text = ($cur_show_obj.network, 'No Network')[None is $cur_show_obj.network] #if 'No Network' != $img_text and 'nonetwork' in $network_images[$cur_show_obj.tvid_prodid] $cur_show_obj.network #else $img_text #end if #end if #if $cur_show_obj.quality in $qualityPresets $qualityPresetStrings[$cur_show_obj.quality] #else Custom #end if
#end for
######################## ## end of poster layout ######################## #else #for $curLoadingShow in $sickgear.show_queue_scheduler.action.loading_showlist #if $curLoadingShow.show_obj != None and $curLoadingShow.show_obj in $sg_str('showList') #continue #end if ## #end for ## #set void = $showlist.sort(key=lambda _x: _x.name) ## #set $poster_id = 0 #set $load_normal = 0 #for $cur_show_obj in $showlist ## #set $cur_airs_next = '' #set $cur_snatched = 0 #set $cur_downloaded = 0 #set $cur_total = 0 #set $download_stat_tip = '' #set $show_name = getattr($cur_show_obj, 'unique_name', $cur_show_obj.name) #set $display_name = (re.sub(r'^((?:A(?!\s+to)n?)|The)\s(\w)', r'\1 \2', $show_name), $show_name)[$sg_var('SORT_ARTICLE')] #set $poster_id += 1 ## #if $cur_show_obj.tvid_prodid in $show_stat #set $cur_airs_next = $show_stat[$cur_show_obj.tvid_prodid]['ep_airs_next'] ## #set $cur_snatched = $show_stat[$cur_show_obj.tvid_prodid]['ep_snatched'] #if not $cur_snatched #set $cur_snatched = 0 #end if ## #set $cur_downloaded = $show_stat[$cur_show_obj.tvid_prodid]['ep_downloaded'] #if not $cur_downloaded #set $cur_downloaded = 0 #end if ## #set $cur_total = $show_stat[$cur_show_obj.tvid_prodid]['ep_total'] #if not $cur_total #set $cur_total = 0 #end if #end if ## #if $cur_total != 0 #set $download_stat = str($cur_downloaded) #set $download_stat_tip = 'Downloaded: ' + str($cur_downloaded) #if $cur_snatched > 0 #set $download_stat = '%s+%s' % ($download_stat, $sg_root, $cur_snatched) #set $download_stat_tip = download_stat_tip + ' ' + 'Snatched: ' + str($cur_snatched) #end if #set $download_stat = download_stat + ' / ' + str($cur_total) #set $download_stat_tip = download_stat_tip + ' ' + 'Total: ' + str($cur_total) #else #set $download_stat = '?' #set $download_stat_tip = 'no data' #end if ## #set $nom = $cur_downloaded #set $den = $cur_total #if $den == 0 #set $den = 1 #end if ## #set $progressbar_percent = $nom * 100 / $den #if not $progressbar_percent #set $progressbar_percent = (0, -1)['?' == $download_stat] #end if ## #if $cur_airs_next #set $ldatetime = $SGDatetime.convert_to_setting($network_timezones.parse_date_time($cur_airs_next, $cur_show_obj.airs, $cur_show_obj.network)) #else #end if #if 'small' == $layout #else if 'banner' == $layout #else if 'simple' == $layout #end if #if 'simple' != $layout #set $img_text = ($cur_show_obj.network, 'No Network')[None is $cur_show_obj.network] #else #end if #if $cur_show_obj.quality in $qualityPresets #else #end if #end for
Next Ep Show Network Quality Downloads Active Status
Add Show
(loading) #if None is $curLoadingShow.show_obj Loading... ($curLoadingShow.show_name) #else $getattr($curLoadingShow.show_obj, 'unique_name', $curLoadingShow.show_obj.name) #end if
$SGDatetime.sbfdate($ldatetime)
$ldatetime.strftime('%Y%m%d%H%M')
$display_name $display_name #if 'No Network' != $img_text and 'nonetwork' in $network_images[$cur_show_obj.tvid_prodid] $cur_show_obj.network #else #echo '%s $cur_show_obj.network #end if $cur_show_obj.network $cur_show_obj.network $qualityPresetStrings[$cur_show_obj.quality]Custom
$download_stat
#set $display_status = $cur_show_obj.status #if None is not $display_status #if re.search(r'(?i)(?:(?:new|returning)\s*series|upcoming)', $cur_show_obj.status) #set $display_status = 'Continuing' #else if re.search(r'(?i)(?:nded)', $cur_show_obj.status) #set $display_status = 'Ended' #end if #end if $display_status
#end if #end for ## #include $os.path.join($sg_str('PROG_DIR'), 'gui/slick/interfaces/default/inc_bottom.tmpl')