mirror of
https://github.com/SickGear/SickGear.git
synced 2024-12-03 18:03:37 +00:00
Fixed DailySearchQueueItem show attribute error during searches
This commit is contained in:
parent
59675f27ac
commit
3efa9709af
2 changed files with 15 additions and 5 deletions
|
@ -49,9 +49,17 @@ class DailySearcher():
|
||||||
[common.UNAIRED, curDate])
|
[common.UNAIRED, curDate])
|
||||||
|
|
||||||
sql_l = []
|
sql_l = []
|
||||||
|
show = None
|
||||||
|
|
||||||
for sqlEp in sqlResults:
|
for sqlEp in sqlResults:
|
||||||
|
|
||||||
try:
|
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:
|
except exceptions.MultipleShowObjectsException:
|
||||||
logger.log(u"ERROR: expected to find a single show matching " + sqlEp["showid"])
|
logger.log(u"ERROR: expected to find a single show matching " + sqlEp["showid"])
|
||||||
continue
|
continue
|
||||||
|
|
|
@ -82,17 +82,19 @@ class SearchQueue(generic_queue.GenericQueue):
|
||||||
# daily searches
|
# daily searches
|
||||||
generic_queue.GenericQueue.add_item(self, item)
|
generic_queue.GenericQueue.add_item(self, item)
|
||||||
elif isinstance(item, BacklogQueueItem) and not self.is_in_queue(item.show, item.segment):
|
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
|
# backlog searches
|
||||||
generic_queue.GenericQueue.add_item(self, item)
|
generic_queue.GenericQueue.add_item(self, item)
|
||||||
elif isinstance(item, (ManualSearchQueueItem, FailedQueueItem)) and not self.is_ep_in_queue(item.segment):
|
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
|
# manual and failed searches
|
||||||
generic_queue.GenericQueue.add_item(self, item)
|
generic_queue.GenericQueue.add_item(self, item)
|
||||||
else:
|
else:
|
||||||
logger.log(u"Not adding item, it's already in the queue", logger.DEBUG)
|
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):
|
class DailySearchQueueItem(generic_queue.QueueItem):
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
|
|
Loading…
Reference in a new issue