mirror of
https://github.com/SickGear/SickGear.git
synced 2025-04-01 00:14:43 +00:00
Remove unneeded datetime convert from Coming Episodes page.
Prevent usage of function .fromtimestamp that can throw exceptions on some platforms. Replace datetime calls with sbdatetime calls.
This commit is contained in:
parent
c681ead67a
commit
1e69286c9f
2 changed files with 6 additions and 5 deletions
|
@ -11,6 +11,7 @@
|
|||
* Change Add Show on Add Trending Show Page to use the full Add New Show flow
|
||||
* Fix adding shows with titles that contain "&" on Add Trending Show page
|
||||
* Fix unset vars on Add New Shows Page used in the Add Existing Shows context
|
||||
* Remove unneeded datetime convert from Coming Episodes page
|
||||
|
||||
|
||||
### 0.3.0 (2014-11-12 14:30:00 UTC)
|
||||
|
|
|
@ -359,10 +359,10 @@
|
|||
#set $too_late_header = True
|
||||
#elif $cur_ep_enddate >= $today and $cur_ep_airdate < $next_week.date():
|
||||
#if $cur_ep_airdate == $today.date():
|
||||
<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">$sbdatetime.sbdatetime.sbfdate($cur_ep_airdate, '%A').decode($sickbeard.SYS_ENCODING).capitalize() <span style="font-size: 14px; vertical-align: top;">[Today]</span></h2>
|
||||
#set $today_header = True
|
||||
#else:
|
||||
<br /><h2 class="day">$datetime.date.fromordinal($cur_ep_airdate.toordinal).strftime('%A').decode($sickbeard.SYS_ENCODING).capitalize()</h2>
|
||||
<br /><h2 class="day">$sbdatetime.sbdatetime.sbfdate($cur_ep_airdate, '%A').decode($sickbeard.SYS_ENCODING).capitalize()</h2>
|
||||
#end if
|
||||
#end if
|
||||
#end if
|
||||
|
@ -371,7 +371,7 @@
|
|||
|
||||
#if $cur_ep_airdate == $today.date() and not $today_header:
|
||||
<div class="comingepheader">
|
||||
<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">$sbdatetime.sbdatetime.sbfdate($cur_ep_airdate, '%A').decode($sickbeard.SYS_ENCODING).capitalize() <span style="font-size: 14px; vertical-align: top;">[Today]</span></h2>
|
||||
#set $today_header = True
|
||||
#end if
|
||||
#if $runtime:
|
||||
|
@ -489,7 +489,7 @@
|
|||
#for $day in $dates
|
||||
#set $tbl_day += 1
|
||||
<table class="sickbeardTable tablesorter calendarTable <%= 'cal-%s' % (('even', 'odd')[1 == tbl_day % 2]) %>" cellspacing="0" border="0" cellpadding="0">
|
||||
<thead><tr><th>$day.strftime('%A').decode($sickbeard.SYS_ENCODING).capitalize()</th></tr></thead>
|
||||
<thead><tr><th>$sbdatetime.sbdatetime.sbfdate($day, '%A').decode($sickbeard.SYS_ENCODING).capitalize()</th></tr></thead>
|
||||
<tbody>
|
||||
#set $day_has_show = False
|
||||
#for $cur_result in $sql_results:
|
||||
|
@ -503,7 +503,7 @@
|
|||
|
||||
#if $airday == $day:
|
||||
#set $day_has_show = True
|
||||
#set $airtime = $sbdatetime.sbdatetime.fromtimestamp($time.mktime($cur_result['localtime'].timetuple())).sbftime().decode($sickbeard.SYS_ENCODING)
|
||||
#set $airtime = $sbdatetime.sbdatetime.sbftime($cur_result['localtime']).decode($sickbeard.SYS_ENCODING)
|
||||
#if $sickbeard.TRIM_ZERO:
|
||||
#set $airtime = re.sub(r'0(\d:\d\d)', r'\1', $airtime, 0, re.IGNORECASE | re.MULTILINE)
|
||||
#end if
|
||||
|
|
Loading…
Reference in a new issue