Jump to Show
+#for $curShow in sorted($sickbeard.showList, key = operator.attrgetter('name')):
+ #if 0 != $showCounts[$curShow.indexerid][$Overview.QUAL] + $showCounts[$curShow.indexerid][$Overview.WANTED]:
+
+ #end if
+#end for
+
#for $curShow in sorted($sickbeard.showList, key = operator.attrgetter('name')):
-#if $showCounts[$curShow.indexerid][$Overview.QUAL] + $showCounts[$curShow.indexerid][$Overview.WANTED] == 0:
-#continue
-#end if
+ #if 0 == $showCounts[$curShow.indexerid][$Overview.QUAL] + $showCounts[$curShow.indexerid][$Overview.WANTED]:
+ #continue
+ #end if
#if int($curResult['airdate']) == 1 then 'never' else $sbdatetime.sbdatetime.sbfdate($sbdatetime.sbdatetime.convert_to_setting($network_timezones.parse_date_time($curResult['airdate'],$curShow.airs,$curShow.network)))#
-#end for
+ #end for
#end for
diff --git a/sickbeard/helpers.py b/sickbeard/helpers.py
index 548cfb6d..7bff89b6 100644
--- a/sickbeard/helpers.py
+++ b/sickbeard/helpers.py
@@ -1025,7 +1025,7 @@ def _check_against_names(nameInQuestion, show, season=-1):
def get_show(name, tryIndexers=False):
- if not sickbeard.showList:
+ if not sickbeard.showList or None is name:
return
showObj = None
diff --git a/sickbeard/webserve.py b/sickbeard/webserve.py
index 341e9519..29b154df 100644
--- a/sickbeard/webserve.py
+++ b/sickbeard/webserve.py
@@ -1533,24 +1533,30 @@ class Home(MainHandler):
myDB = db.DBConnection()
myDB.mass_action(sql_l)
- if int(status) == WANTED:
- msg = 'Backlog was automatically started for the following seasons of ' + showObj.name + ': '
- msg += '
'
-
+ if WANTED == int(status):
+ season_list = ''
+ season_wanted = []
for season, segment in segments.items():
- cur_backlog_queue_item = search_queue.BacklogQueueItem(showObj, segment)
- sickbeard.searchQueueScheduler.action.add_item(cur_backlog_queue_item) # @UndefinedVariable
+ if not showObj.paused:
+ cur_backlog_queue_item = search_queue.BacklogQueueItem(showObj, segment)
+ sickbeard.searchQueueScheduler.action.add_item(cur_backlog_queue_item) # @UndefinedVariable
- msg += '
Season ' + str(season) + '
'
- logger.log(u'Sending backlog for ' + showObj.name + ' season ' + str(
- season) + ' because some eps were set to wanted')
+ if season not in season_wanted:
+ season_wanted += [season]
+ season_list += u'
Season %s
' % season
+ logger.log((u'Not adding wanted eps to backlog search for %s season %s because show is paused',
+ u'Starting backlog search for %s season %s because eps were set to wanted')[
+ not showObj.paused] % (showObj.name, season))
- msg += '
'
+ (title, msg) = (('Not starting backlog', u'Paused show prevented backlog search'),
+ ('Backlog started', u'Backlog search started'))[not showObj.paused]
if segments:
- ui.notifications.message('Backlog started', msg)
+ ui.notifications.message(title,
+ u'%s for the following seasons of %s:
%s
'
+ % (msg, showObj.name, season_list))
- if int(status) == FAILED:
+ elif FAILED == int(status):
msg = 'Retrying Search was automatically started for the following season of ' + showObj.name + ': '
msg += '