From 037cee782035a85a6da86ee13af9553f41795d33 Mon Sep 17 00:00:00 2001 From: echel0n Date: Mon, 30 Jun 2014 00:15:29 -0700 Subject: [PATCH] Testing fix #1 for "TypeError: argument of type 'NoneType' is not iterable" 500 error --- gui/slick/interfaces/default/inc_bottom.tmpl | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/gui/slick/interfaces/default/inc_bottom.tmpl b/gui/slick/interfaces/default/inc_bottom.tmpl index 51b31f3b..7a34c25a 100644 --- a/gui/slick/interfaces/default/inc_bottom.tmpl +++ b/gui/slick/interfaces/default/inc_bottom.tmpl @@ -9,8 +9,15 @@
#set $myDB = $db.DBConnection() #set $today = str($datetime.date.today().toordinal()) + +#if $sickbeard.showList: #set $numShows = len($sickbeard.showList) #set $numGoodShows = len([x for x in $sickbeard.showList if x.paused == 0 and "Ended" not in x.status]) +#else +#set $numShows = 0 +#set $numGoodShows = 0 +#end if + #set $numDLEpisodes = $myDB.select("SELECT COUNT(*) FROM tv_episodes WHERE status IN ("+",".join([str(x) for x in $Quality.DOWNLOADED + [$ARCHIVED]])+") AND season != 0 and episode != 0 AND airdate <= "+$today+"")[0][0] #set $numEpisodes = $myDB.select("SELECT COUNT(*) FROM tv_episodes WHERE season != 0 and episode != 0 AND (airdate != 1 OR status IN ("+",".join([str(x) for x in ($Quality.DOWNLOADED + $Quality.SNATCHED + $Quality.SNATCHED_PROPER) + [$ARCHIVED]])+")) AND airdate <= "+$today+" AND status != "+str($IGNORED)+"")[0][0] $numShows shows ($numGoodShows active) | $numDLEpisodes/$numEpisodes episodes downloaded |