mirror of
https://github.com/moparisthebest/SickRage
synced 2024-12-13 03:22:22 -05:00
Fixed DailySearchQueueItem show attribute error during searches
This commit is contained in:
parent
59675f27ac
commit
3efa9709af
@ -49,9 +49,17 @@ class DailySearcher():
|
||||
[common.UNAIRED, curDate])
|
||||
|
||||
sql_l = []
|
||||
show = None
|
||||
|
||||
for sqlEp in sqlResults:
|
||||
|
||||
try:
|
||||
show = helpers.findCertainShow(sickbeard.showList, int(sqlEp["showid"]))
|
||||
if not show or (show and int(sqlEp["showid"]) != show.indexerid):
|
||||
show = helpers.findCertainShow(sickbeard.showList, int(sqlEp["showid"]))
|
||||
|
||||
# build name cache for show
|
||||
sickbeard.name_cache.buildNameCache(show)
|
||||
|
||||
except exceptions.MultipleShowObjectsException:
|
||||
logger.log(u"ERROR: expected to find a single show matching " + sqlEp["showid"])
|
||||
continue
|
||||
|
@ -82,17 +82,19 @@ class SearchQueue(generic_queue.GenericQueue):
|
||||
# daily searches
|
||||
generic_queue.GenericQueue.add_item(self, item)
|
||||
elif isinstance(item, BacklogQueueItem) and not self.is_in_queue(item.show, item.segment):
|
||||
# build name cache for show
|
||||
sickbeard.name_cache.buildNameCache(item.show)
|
||||
|
||||
# backlog searches
|
||||
generic_queue.GenericQueue.add_item(self, item)
|
||||
elif isinstance(item, (ManualSearchQueueItem, FailedQueueItem)) and not self.is_ep_in_queue(item.segment):
|
||||
# build name cache for show
|
||||
sickbeard.name_cache.buildNameCache(item.show)
|
||||
|
||||
# manual and failed searches
|
||||
generic_queue.GenericQueue.add_item(self, item)
|
||||
else:
|
||||
logger.log(u"Not adding item, it's already in the queue", logger.DEBUG)
|
||||
return
|
||||
|
||||
# build name cache for show
|
||||
sickbeard.name_cache.buildNameCache(item.show)
|
||||
|
||||
class DailySearchQueueItem(generic_queue.QueueItem):
|
||||
def __init__(self):
|
||||
|
Loading…
Reference in New Issue
Block a user