1
0
mirror of https://github.com/moparisthebest/SickRage synced 2024-08-13 16:53:54 -04: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: