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:
parent
5c43787560
commit
1a1f9d3e77
@ -121,13 +121,16 @@
|
||||
|
||||
#for $cur_result in $sql_results:
|
||||
#set $cur_indexer = int($cur_result["indexer"])
|
||||
#set $runtime = $cur_result["runtime"]
|
||||
|
||||
#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 $runtime:
|
||||
#set $cur_ep_enddate = $cur_result["localtime"] + datetime.timedelta(minutes=$runtime)
|
||||
#if $cur_ep_enddate < $today:
|
||||
#set $show_div = "listing_overdue"
|
||||
#elif $cur_ep_airdate >= $next_week.date():
|
||||
@ -139,6 +142,7 @@
|
||||
#set $show_div = "listing_default"
|
||||
#end if
|
||||
#end if
|
||||
#end if
|
||||
|
||||
<!-- start $cur_result["show_name"] //-->
|
||||
<tr class="$show_div">
|
||||
@ -220,13 +224,17 @@
|
||||
#continue
|
||||
#end if
|
||||
|
||||
#set $runtime = $cur_result["runtime"]
|
||||
|
||||
#if $sort == "network":
|
||||
#if $cur_result["network"] and $cur_segment != $cur_result["network"]:
|
||||
<h1 class="network">$cur_result["network"]</h1>
|
||||
#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 $runtime:
|
||||
#set $cur_ep_enddate = $cur_result["localtime"] + datetime.timedelta(minutes=$runtime)
|
||||
#if $cur_ep_enddate < $today:
|
||||
#set $show_div = "ep_listing listing_overdue"
|
||||
#elif $cur_ep_airdate >= $next_week.date():
|
||||
@ -238,10 +246,13 @@
|
||||
#set $show_div = "ep_listing listing_default"
|
||||
#end if
|
||||
#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 $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:
|
||||
<br /><h1 class="day">Missed</h1>
|
||||
#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>
|
||||
#end if
|
||||
#end if
|
||||
#end if
|
||||
#set $cur_segment = $cur_ep_airdate
|
||||
#end if
|
||||
#if $cur_ep_airdate == $today.date() and not $today_header:
|
||||
@ -275,7 +287,9 @@
|
||||
#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 $runtime:
|
||||
#set $cur_ep_enddate = $cur_result["localtime"] + datetime.timedelta(minutes=$runtime)
|
||||
#if $cur_ep_enddate < $today:
|
||||
#set $show_div = "ep_listing listing_overdue"
|
||||
#elif $cur_ep_airdate >= $next_week.date():
|
||||
@ -288,6 +302,7 @@
|
||||
#end if
|
||||
#end if
|
||||
#end if
|
||||
#end if
|
||||
|
||||
<div class="$show_div" id="listing_${cur_result["showid"]}">
|
||||
<div class="tvshowDiv">
|
||||
|
Loading…
Reference in New Issue
Block a user