1
0
mirror of https://github.com/moparisthebest/SickRage synced 2024-11-18 07:15:13 -05:00

Fixes empty searchStrings and empty itemList issues if they happened.

This commit is contained in:
echel0n 2014-05-04 20:13:10 -07:00
parent a5b72dea84
commit 235a5d0161

View File

@ -250,13 +250,13 @@ class GenericProvider:
searchStrings += self._get_episode_search_strings(epObj)
# remove duplicate search strings
searchStrings = [i for n, i in enumerate(searchStrings) if i not in searchStrings[n + 1:]]
searchStrings = [i for n, i in enumerate(searchStrings) if i not in searchStrings[n + 1:]] if len(searchStrings) else []
for curString in sorted(searchStrings):
itemList += self._doSearch(curString)
# remove duplicate items
itemList = [i for n, i in enumerate(itemList) if i not in itemList[n + 1:]]
itemList = [i for n, i in enumerate(itemList) if i not in itemList[n + 1:]] if len(itemList) else []
for item in itemList: