#import sickbeard #import datetime #from sickbeard.common import * #from sickbeard import sbdatetime #set global $title="Coming Episodes" #set global $header="Coming Episodes" #set global $sbPath=".." #set global $topmenu="comingEpisodes" #import os.path #include $os.path.join($sickbeard.PROG_DIR, "gui/slick/interfaces/default/inc_top.tmpl") #set $sort = $sickbeard.COMING_EPS_SORT #if $varExists('header')

$header

#else

$title

#end if
Key: Missed Current Future Distant Subscribe
#if $layout == 'list': #set $show_div = "listing_default" #for $cur_result in $sql_results: #if int($cur_result["paused"]) and not $sickbeard.COMING_EPS_DISPLAY_PAUSED: #continue #end if #set $cur_ep_airdate = $cur_result["localtime"].date() #set $cur_ep_enddate = $cur_result["localtime"] + datetime.timedelta(minutes=$cur_result["runtime"]) #if $cur_ep_enddate < $today: #set $show_div = "listing_overdue" #elif $cur_ep_airdate >= $next_week.date(): #set $show_div = "listing_toofar" #elif $cur_ep_airdate >= $today.date() and $cur_ep_airdate < $next_week.date(): #if $cur_ep_airdate == $today.date(): #set $show_div = "listing_current" #else: #set $show_div = "listing_default" #end if #end if #end for
AirdateShowNext EpNext Ep NameNetworkQualityIMDbtvDBSearch
$sbdatetime.sbdatetime.sbfdatetime($cur_result["localtime"]).decode($sickbeard.SYS_ENCODING)$time.mktime($cur_result["localtime"].timetuple()) $cur_result["show_name"] #if int($cur_result["paused"]): [paused] #end if <%="%02ix%02i" % (int(cur_result["season"]), int(cur_result["episode"])) %> #if $cur_result["description"] != "" and $cur_result["description"] != None: " style="padding-top: 6px;"/> #end if $cur_result["name"] $cur_result["network"] #if int($cur_result["quality"]) in $qualityPresets: $qualityPresetStrings[int($cur_result["quality"])] #else: Custom #end if #if $cur_result["imdb_id"]: [imdb] #end if [tvdb] [search]
#else: #set $cur_segment = None #set $too_late_header = False #set $missed_header = False #set $today_header = False #set $show_div = "ep_listing listing_default" #if $sort == "show":

#end if #for $cur_result in $sql_results: #if int($cur_result["paused"]) and not $sickbeard.COMING_EPS_DISPLAY_PAUSED: #continue #end if #if $sort == "network": #if $cur_result["network"] and $cur_segment != $cur_result["network"]:

$cur_result["network"]

#set $cur_segment = $cur_result["network"] #end if #set $cur_ep_airdate = $cur_result["localtime"].date() #set $cur_ep_enddate = $cur_result["localtime"] + datetime.timedelta(minutes=$cur_result["runtime"]) #if $cur_ep_enddate < $today: #set $show_div = "ep_listing listing_overdue" #elif $cur_ep_airdate >= $next_week.date(): #set $show_div = "ep_listing listing_toofar" #elif $cur_ep_enddate >= $today and $cur_ep_airdate < $next_week.date(): #if $cur_ep_airdate == $today.date(): #set $show_div = "ep_listing listing_current" #else: #set $show_div = "ep_listing listing_default" #end if #end if #elif $sort == "date": #set $cur_ep_airdate = $cur_result["localtime"].date() #set $cur_ep_enddate = $cur_result["localtime"] + datetime.timedelta(minutes=$cur_result["runtime"]) #if $cur_segment != $cur_ep_airdate: #if $cur_ep_enddate < $today and $cur_ep_airdate != $today.date() and not $missed_header:

Missed

#set $missed_header = True #elif $cur_ep_airdate >= $next_week.date() and not $too_late_header:

Later

#set $too_late_header = True #elif $cur_ep_enddate >= $today and $cur_ep_airdate < $next_week.date(): #if $cur_ep_airdate == $today.date():

$datetime.date.fromordinal($cur_ep_airdate.toordinal).strftime("%A").decode($sickbeard.SYS_ENCODING).capitalize() [today]

#set $today_header = True #else:

$datetime.date.fromordinal($cur_ep_airdate.toordinal).strftime("%A").decode($sickbeard.SYS_ENCODING).capitalize()

#end if #end if #set $cur_segment = $cur_ep_airdate #end if #if $cur_ep_airdate == $today.date() and not $today_header:

$datetime.date.fromordinal($cur_ep_airdate.toordinal).strftime("%A").decode($sickbeard.SYS_ENCODING).capitalize() [today]

#set $today_header = True #end if #if $cur_ep_enddate < $today: #set $show_div = "ep_listing listing_overdue" #elif $cur_ep_airdate >= $next_week.date(): #set $show_div = "ep_listing listing_toofar" #elif $cur_ep_enddate >= $today and $cur_ep_airdate < $next_week.date(): #if $cur_ep_airdate == $today.date(): #set $show_div = "ep_listing listing_current" #else: #set $show_div = "ep_listing listing_default" #end if #end if #elif $sort == "show": #set $cur_ep_airdate = $cur_result["localtime"].date() #set $cur_ep_enddate = $cur_result["localtime"] + datetime.timedelta(minutes=$cur_result["runtime"]) #if $cur_ep_enddate < $today: #set $show_div = "ep_listing listing_overdue" #elif $cur_ep_airdate >= $next_week.date(): #set $show_div = "ep_listing listing_toofar" #elif $cur_ep_enddate >= $today and $cur_ep_airdate < $next_week.date(): #if $cur_ep_airdate == $today.date(): #set $show_div = "ep_listing listing_current" #else: #set $show_div = "ep_listing listing_default" #end if #end if #end if
#if $layout == 'banner': #end if
Next Episode: <%=str(cur_result["season"])+"x"+"%02i" % int(cur_result["episode"]) %> - $cur_result["name"] ($sbdatetime.sbdatetime.fromtimestamp($time.mktime($cur_result["localtime"].timetuple())).sbfdate().decode($sickbeard.SYS_ENCODING))
Airs: $sbdatetime.sbdatetime.fromtimestamp($time.mktime($cur_result["localtime"].timetuple())).sbftime().decode($sickbeard.SYS_ENCODING) on $cur_result["network"]
Quality: #if int($cur_result["quality"]) in $qualityPresets: $qualityPresetStrings[int($cur_result["quality"])] #else: Custom #end if
#if $cur_result["description"] == '': Plot:
[There is no summary added for this episode]
#else: Plot:
$cur_result["description"]
#end if
#end for #end if #include $os.path.join($sickbeard.PROG_DIR, "gui/slick/interfaces/default/inc_bottom.tmpl")