mirror of
https://github.com/SickGear/SickGear.git
synced 2024-12-03 18:03:37 +00:00
Merge pull request #55 from JackDandy/feature/FixComingEpsIncludeShows
Fix Coming Eps Page to include shows +/- 1 day for time zone corrections.
This commit is contained in:
commit
d9e3eacdda
3 changed files with 10 additions and 5 deletions
|
@ -1,4 +1,4 @@
|
||||||
### 0.4.0 (2014-11-23 08:44:00 UTC)
|
### 0.4.0 (2014-11-24 00:55:00 UTC)
|
||||||
|
|
||||||
* Change footer stats to not add newlines when copy/pasting from them
|
* Change footer stats to not add newlines when copy/pasting from them
|
||||||
* Remove redundant references from Config/Help & Info
|
* Remove redundant references from Config/Help & Info
|
||||||
|
@ -48,6 +48,7 @@
|
||||||
* Fix Add Trending Shows "Not In library" now filters tvrage added shows
|
* Fix Add Trending Shows "Not In library" now filters tvrage added shows
|
||||||
* Add a hover over text "In library" on Add Trending Shows to display tv database show was added from
|
* Add a hover over text "In library" on Add Trending Shows to display tv database show was added from
|
||||||
* Fix reduces time API endpoint Shows takes to return results
|
* Fix reduces time API endpoint Shows takes to return results
|
||||||
|
* Fix Coming Eps Page to include shows +/- 1 day for time zone corrections
|
||||||
|
|
||||||
### 0.3.1 (2014-11-19 16:40:00 UTC)
|
### 0.3.1 (2014-11-19 16:40:00 UTC)
|
||||||
|
|
||||||
|
|
|
@ -375,6 +375,7 @@
|
||||||
#set $today_header = True
|
#set $today_header = True
|
||||||
#end if
|
#end if
|
||||||
#if $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():
|
||||||
|
|
|
@ -351,11 +351,12 @@ class MainHandler(RequestHandler):
|
||||||
|
|
||||||
def comingEpisodes(self, layout="None"):
|
def comingEpisodes(self, layout="None"):
|
||||||
|
|
||||||
today1 = datetime.date.today()
|
today1 = datetime.date.today() - datetime.timedelta(days=1)
|
||||||
today = today1.toordinal()
|
today = today1.toordinal()
|
||||||
|
tommorrow = (datetime.date.today() + datetime.timedelta(days=1))
|
||||||
next_week1 = (datetime.date.today() + datetime.timedelta(days=7))
|
next_week1 = (datetime.date.today() + datetime.timedelta(days=7))
|
||||||
next_week = next_week1.toordinal()
|
next_week = (next_week1 + datetime.timedelta(days=1)).toordinal()
|
||||||
recently = (datetime.date.today() - datetime.timedelta(days=sickbeard.COMING_EPS_MISSED_RANGE)).toordinal()
|
recently = (today1 - datetime.timedelta(days=sickbeard.COMING_EPS_MISSED_RANGE)).toordinal()
|
||||||
|
|
||||||
done_show_list = []
|
done_show_list = []
|
||||||
qualList = Quality.DOWNLOADED + Quality.SNATCHED + [ARCHIVED, IGNORED]
|
qualList = Quality.DOWNLOADED + Quality.SNATCHED + [ARCHIVED, IGNORED]
|
||||||
|
@ -378,9 +379,11 @@ class MainHandler(RequestHandler):
|
||||||
|
|
||||||
more_sql_results = myDB.select(
|
more_sql_results = myDB.select(
|
||||||
"SELECT *, tv_shows.status as show_status FROM tv_episodes, tv_shows WHERE season != 0 AND tv_shows.indexer_id = tv_episodes.showid AND airdate < ? AND airdate >= ? AND tv_episodes.status = ? AND tv_episodes.status NOT IN (" + ','.join(
|
"SELECT *, tv_shows.status as show_status FROM tv_episodes, tv_shows WHERE season != 0 AND tv_shows.indexer_id = tv_episodes.showid AND airdate < ? AND airdate >= ? AND tv_episodes.status = ? AND tv_episodes.status NOT IN (" + ','.join(
|
||||||
['?'] * len(qualList)) + ")", [today, recently, WANTED] + qualList)
|
['?'] * len(qualList)) + ")", [tommorrow, recently, WANTED] + qualList)
|
||||||
sql_results += more_sql_results
|
sql_results += more_sql_results
|
||||||
|
|
||||||
|
sql_results = list(set(sql_results))
|
||||||
|
|
||||||
# sort by localtime
|
# sort by localtime
|
||||||
sorts = {
|
sorts = {
|
||||||
'date': (lambda x, y: cmp(x["localtime"], y["localtime"])),
|
'date': (lambda x, y: cmp(x["localtime"], y["localtime"])),
|
||||||
|
|
Loading…
Reference in a new issue