Private GIT

Skip to content
Snippets Groups Projects
Commit 6309378c authored by miigotu's avatar miigotu
Browse files

Merge pull request #2919 from ROpdebee/develop

Should fix SiCKRAGETV/sickrage-issues/issues/3273
parents 184e91ab 97a323c9
Branches
Tags
No related merge requests found
...@@ -207,6 +207,12 @@ ...@@ -207,6 +207,12 @@
continue continue
run_time = cur_result['runtime'] run_time = cur_result['runtime']
cur_ep_airdate = cur_result['localtime'].date()
if run_time:
cur_ep_enddate = cur_result['localtime'] + datetime.timedelta(minutes = run_time)
else:
cur_ep_enddate = cur_result['localtime']
%> %>
% if 'network' == sort: % if 'network' == sort:
<% show_network = ('no network', cur_result['network'])[bool(cur_result['network'])] %> <% show_network = ('no network', cur_result['network'])[bool(cur_result['network'])] %>
...@@ -216,10 +222,7 @@ ...@@ -216,10 +222,7 @@
<% cur_segment = cur_result['network'] %> <% cur_segment = cur_result['network'] %>
% endif % endif
<% cur_ep_airdate = cur_result['localtime'].date() %>
% if run_time:
<% cur_ep_enddate = cur_result['localtime'] + datetime.timedelta(minutes = run_time) %>
% if cur_ep_enddate < today: % if cur_ep_enddate < today:
<% show_div = 'ep_listing listing-overdue' %> <% show_div = 'ep_listing listing-overdue' %>
% elif cur_ep_airdate >= next_week.date(): % elif cur_ep_airdate >= next_week.date():
...@@ -231,13 +234,9 @@ ...@@ -231,13 +234,9 @@
<% show_div = 'ep_listing listing-default' %> <% show_div = 'ep_listing listing-default' %>
% endif % endif
% endif % endif
% endif
% elif 'date' == sort:
<% cur_ep_airdate = cur_result['localtime'].date() %>
% elif 'date' == sort:
% if cur_segment != cur_ep_airdate: % if cur_segment != cur_ep_airdate:
%if run_time:
<% cur_ep_enddate = cur_result['localtime'] + datetime.timedelta(minutes = run_time) %>
% 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 /><h2 class="day">Missed</h2> <br /><h2 class="day">Missed</h2>
<% missed_header = True %> <% missed_header = True %>
...@@ -252,7 +251,6 @@ ...@@ -252,7 +251,6 @@
<br /><h2 class="day">${datetime.date.fromordinal(cur_ep_airdate.toordinal()).strftime('%A').decode(sickbeard.SYS_ENCODING).capitalize()}</h2> <br /><h2 class="day">${datetime.date.fromordinal(cur_ep_airdate.toordinal()).strftime('%A').decode(sickbeard.SYS_ENCODING).capitalize()}</h2>
% endif % endif
% endif % endif
% endif
<% cur_segment = cur_ep_airdate %> <% cur_segment = cur_ep_airdate %>
% endif % endif
...@@ -261,7 +259,7 @@ ...@@ -261,7 +259,7 @@
<br /><h2 class="day">${datetime.date.fromordinal(cur_ep_airdate.toordinal()).strftime('%A').decode(sickbeard.SYS_ENCODING).capitalize()} <span style="font-size: 14px; vertical-align: top;">[Today]</span></h2> <br /><h2 class="day">${datetime.date.fromordinal(cur_ep_airdate.toordinal()).strftime('%A').decode(sickbeard.SYS_ENCODING).capitalize()} <span style="font-size: 14px; vertical-align: top;">[Today]</span></h2>
<% today_header = True %> <% today_header = True %>
% endif % endif
% if run_time:
% if cur_ep_enddate < today: % if cur_ep_enddate < today:
<% show_div = 'ep_listing listing-overdue' %> <% show_div = 'ep_listing listing-overdue' %>
% elif cur_ep_airdate >= next_week.date(): % elif cur_ep_airdate >= next_week.date():
...@@ -273,13 +271,8 @@ ...@@ -273,13 +271,8 @@
<% show_div = 'ep_listing listing-default'%> <% show_div = 'ep_listing listing-default'%>
% endif % endif
% endif % endif
% endif
% elif 'show' == sort: % elif 'show' == sort:
<% cur_ep_airdate = cur_result['localtime'].date() %>
% if run_time:
<% cur_ep_enddate = cur_result['localtime'] + datetime.timedelta(minutes = run_time) %>
% if cur_ep_enddate < today: % if cur_ep_enddate < today:
<% show_div = 'ep_listing listing-overdue listingradius' %> <% show_div = 'ep_listing listing-overdue listingradius' %>
% elif cur_ep_airdate >= next_week.date(): % elif cur_ep_airdate >= next_week.date():
...@@ -292,7 +285,6 @@ ...@@ -292,7 +285,6 @@
% endif % endif
% endif % endif
% endif % endif
% endif
<div class="${show_div}" id="listing-${cur_result['showid']}"> <div class="${show_div}" id="listing-${cur_result['showid']}">
<div class="tvshowDiv"> <div class="tvshowDiv">
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment