#import sickbeard
#import datetime
#from sickbeard.common import *
#from sickbeard import sbdatetime, network_timezones
##
#set global $title = 'Backlog Overview'
#set global $header = 'Backlog Overview'
#set global $sbPath = '..'
#set global $topmenu = 'manage'
#set global $page_body_attr = 'backlog'
##
#import os.path
#include $os.path.join($sickbeard.PROG_DIR, 'gui/slick/interfaces/default/inc_top.tmpl')
##
#if $varExists('header')
#else
$title
#end if
##
#set $totalWanted = 0
#set $totalQual = 0
#for $curShow in $sickbeard.showList
#set $totalWanted += $showCounts[$curShow.indexerid][$Overview.WANTED]
#set $totalQual += $showCounts[$curShow.indexerid][$Overview.QUAL]
#end for
##
#if not $totalWanted
no shows require a backlog search
#else
Jump to Show
#for $curShow in sorted($sickbeard.showList, key = operator.attrgetter('name')):
#if 0 != $showCounts[$curShow.indexerid][$Overview.QUAL] + $showCounts[$curShow.indexerid][$Overview.WANTED]:
$curShow.name
#end if
#end for
#end if
#for $curShow in sorted($sickbeard.showList, key = operator.attrgetter('name')):
##
#if 0 == $showCounts[$curShow.indexerid][$Overview.QUAL] + $showCounts[$curShow.indexerid][$Overview.WANTED]:
#continue
#end if
Episode Name Airdate
##
#for $curResult in $showSQLResults[$curShow.indexerid]:
#set $whichStr = '%sx%s' % ($str($curResult['season']), $str($curResult['episode']))
#try:
#set $overview = $showCats[$curShow.indexerid][$whichStr]
#except Exception
#continue
#end try
##
#if $overview in ($Overview.QUAL, $Overview.WANTED)
#
$whichStr
$curResult['name']
#if 1 == int($curResult['airdate']) then 'never' else $sbdatetime.sbdatetime.sbfdate($sbdatetime.sbdatetime.convert_to_setting($network_timezones.parse_date_time($curResult['airdate'], $curShow.airs,$curShow.network)))#
#
#end if
#end for
#end for
#include $os.path.join($sickbeard.PROG_DIR, 'gui/slick/interfaces/default/inc_bottom.tmpl')