1
0
mirror of https://github.com/moparisthebest/SickRage synced 2024-11-11 03:45:01 -05:00

Fixed issue for shows that don't return a runtime typically from TVRage indexer

This commit is contained in:
echel0n 2014-05-23 03:00:45 -07:00
parent 5c43787560
commit 1a1f9d3e77

View File

@ -121,13 +121,16 @@
#for $cur_result in $sql_results: #for $cur_result in $sql_results:
#set $cur_indexer = int($cur_result["indexer"]) #set $cur_indexer = int($cur_result["indexer"])
#set $runtime = $cur_result["runtime"]
#if int($cur_result["paused"]) and not $sickbeard.COMING_EPS_DISPLAY_PAUSED: #if int($cur_result["paused"]) and not $sickbeard.COMING_EPS_DISPLAY_PAUSED:
#continue #continue
#end if #end if
#set $cur_ep_airdate = $cur_result["localtime"].date() #set $cur_ep_airdate = $cur_result["localtime"].date()
#set $cur_ep_enddate = $cur_result["localtime"] + datetime.timedelta(minutes=$cur_result["runtime"])
#if $runtime:
#set $cur_ep_enddate = $cur_result["localtime"] + datetime.timedelta(minutes=$runtime)
#if $cur_ep_enddate < $today: #if $cur_ep_enddate < $today:
#set $show_div = "listing_overdue" #set $show_div = "listing_overdue"
#elif $cur_ep_airdate >= $next_week.date(): #elif $cur_ep_airdate >= $next_week.date():
@ -139,6 +142,7 @@
#set $show_div = "listing_default" #set $show_div = "listing_default"
#end if #end if
#end if #end if
#end if
<!-- start $cur_result["show_name"] //--> <!-- start $cur_result["show_name"] //-->
<tr class="$show_div"> <tr class="$show_div">
@ -220,13 +224,17 @@
#continue #continue
#end if #end if
#set $runtime = $cur_result["runtime"]
#if $sort == "network": #if $sort == "network":
#if $cur_result["network"] and $cur_segment != $cur_result["network"]: #if $cur_result["network"] and $cur_segment != $cur_result["network"]:
<h1 class="network">$cur_result["network"]</h1> <h1 class="network">$cur_result["network"]</h1>
#set $cur_segment = $cur_result["network"] #set $cur_segment = $cur_result["network"]
#end if #end if
#set $cur_ep_airdate = $cur_result["localtime"].date() #set $cur_ep_airdate = $cur_result["localtime"].date()
#set $cur_ep_enddate = $cur_result["localtime"] + datetime.timedelta(minutes=$cur_result["runtime"])
#if $runtime:
#set $cur_ep_enddate = $cur_result["localtime"] + datetime.timedelta(minutes=$runtime)
#if $cur_ep_enddate < $today: #if $cur_ep_enddate < $today:
#set $show_div = "ep_listing listing_overdue" #set $show_div = "ep_listing listing_overdue"
#elif $cur_ep_airdate >= $next_week.date(): #elif $cur_ep_airdate >= $next_week.date():
@ -238,10 +246,13 @@
#set $show_div = "ep_listing listing_default" #set $show_div = "ep_listing listing_default"
#end if #end if
#end if #end if
#end if
#elif $sort == "date": #elif $sort == "date":
#set $cur_ep_airdate = $cur_result["localtime"].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_segment != $cur_ep_airdate:
#if $runtime:
#set $cur_ep_enddate = $cur_result["localtime"] + datetime.timedelta(minutes=$runtime)
#if $cur_ep_enddate < $today and $cur_ep_airdate != $today.date() and not $missed_header: #if $cur_ep_enddate < $today and $cur_ep_airdate != $today.date() and not $missed_header:
<br /><h1 class="day">Missed</h1> <br /><h1 class="day">Missed</h1>
#set $missed_header = True #set $missed_header = True
@ -256,6 +267,7 @@
<br /><h1 class="day">$datetime.date.fromordinal($cur_ep_airdate.toordinal).strftime("%A").decode($sickbeard.SYS_ENCODING).capitalize()</h1> <br /><h1 class="day">$datetime.date.fromordinal($cur_ep_airdate.toordinal).strftime("%A").decode($sickbeard.SYS_ENCODING).capitalize()</h1>
#end if #end if
#end if #end if
#end if
#set $cur_segment = $cur_ep_airdate #set $cur_segment = $cur_ep_airdate
#end if #end if
#if $cur_ep_airdate == $today.date() and not $today_header: #if $cur_ep_airdate == $today.date() and not $today_header:
@ -275,7 +287,9 @@
#end if #end if
#elif $sort == "show": #elif $sort == "show":
#set $cur_ep_airdate = $cur_result["localtime"].date() #set $cur_ep_airdate = $cur_result["localtime"].date()
#set $cur_ep_enddate = $cur_result["localtime"] + datetime.timedelta(minutes=$cur_result["runtime"])
#if $runtime:
#set $cur_ep_enddate = $cur_result["localtime"] + datetime.timedelta(minutes=$runtime)
#if $cur_ep_enddate < $today: #if $cur_ep_enddate < $today:
#set $show_div = "ep_listing listing_overdue" #set $show_div = "ep_listing listing_overdue"
#elif $cur_ep_airdate >= $next_week.date(): #elif $cur_ep_airdate >= $next_week.date():
@ -288,6 +302,7 @@
#end if #end if
#end if #end if
#end if #end if
#end if
<div class="$show_div" id="listing_${cur_result["showid"]}"> <div class="$show_div" id="listing_${cur_result["showid"]}">
<div class="tvshowDiv"> <div class="tvshowDiv">