diff --git a/CHANGES.md b/CHANGES.md index 2e2d839f..c04b3b96 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -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 * Remove redundant references from Config/Help & Info @@ -48,6 +48,7 @@ * 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 * 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) diff --git a/gui/slick/interfaces/default/comingEpisodes.tmpl b/gui/slick/interfaces/default/comingEpisodes.tmpl index a4645cf7..1a5299bc 100644 --- a/gui/slick/interfaces/default/comingEpisodes.tmpl +++ b/gui/slick/interfaces/default/comingEpisodes.tmpl @@ -375,6 +375,7 @@ #set $today_header = True #end if #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(): diff --git a/sickbeard/webserve.py b/sickbeard/webserve.py index bba1be70..09a69e72 100644 --- a/sickbeard/webserve.py +++ b/sickbeard/webserve.py @@ -351,11 +351,12 @@ class MainHandler(RequestHandler): def comingEpisodes(self, layout="None"): - today1 = datetime.date.today() + today1 = datetime.date.today() - datetime.timedelta(days=1) today = today1.toordinal() + tommorrow = (datetime.date.today() + datetime.timedelta(days=1)) next_week1 = (datetime.date.today() + datetime.timedelta(days=7)) - next_week = next_week1.toordinal() - recently = (datetime.date.today() - datetime.timedelta(days=sickbeard.COMING_EPS_MISSED_RANGE)).toordinal() + next_week = (next_week1 + datetime.timedelta(days=1)).toordinal() + recently = (today1 - datetime.timedelta(days=sickbeard.COMING_EPS_MISSED_RANGE)).toordinal() done_show_list = [] qualList = Quality.DOWNLOADED + Quality.SNATCHED + [ARCHIVED, IGNORED] @@ -378,9 +379,11 @@ class MainHandler(RequestHandler): 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( - ['?'] * len(qualList)) + ")", [today, recently, WANTED] + qualList) + ['?'] * len(qualList)) + ")", [tommorrow, recently, WANTED] + qualList) sql_results += more_sql_results + sql_results = list(set(sql_results)) + # sort by localtime sorts = { 'date': (lambda x, y: cmp(x["localtime"], y["localtime"])),