From 9cdc03c55e75b1d39c892d11526e62b9c8f54625 Mon Sep 17 00:00:00 2001 From: JackDandy Date: Sun, 1 Jan 2017 18:07:46 +0000 Subject: [PATCH] Add display unaired season 1 episodes of a new show in view modes regular and pro I. --- CHANGES.md | 1 + sickbeard/webserve.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGES.md b/CHANGES.md index dde9ba32..c18196cb 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -2,6 +2,7 @@ * Change don't fetch caps for disabled nzb providers * Change recent search to use centralised title and URL parser for newznab +* Add display unaired season 1 episodes of a new show in regular and pro I view modes [develop changelog] diff --git a/sickbeard/webserve.py b/sickbeard/webserve.py index 4460551e..1c3fcb2a 100644 --- a/sickbeard/webserve.py +++ b/sickbeard/webserve.py @@ -1380,7 +1380,7 @@ class Home(MainHandler): for row in my_db.select('SELECT max(season) as latest FROM tv_episodes WHERE showid = ?' + ' and 1000 < airdate and ? < status', [showObj.indexerid, UNAIRED]): - t.latest_season = row['latest'] + t.latest_season = row['latest'] or {0: 1, 1: 1, 2: None}.get(sickbeard.DISPLAY_SHOW_VIEWMODE) t.season_min = ([], [1])[2 < t.latest_season] + [t.latest_season] t.other_seasons = (list(set(all_seasons) - set(t.season_min)), [])[display_show_minimum]