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:
parent
a5b72dea84
commit
235a5d0161
@ -250,13 +250,13 @@ class GenericProvider:
|
|||||||
searchStrings += self._get_episode_search_strings(epObj)
|
searchStrings += self._get_episode_search_strings(epObj)
|
||||||
|
|
||||||
# remove duplicate search strings
|
# 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):
|
for curString in sorted(searchStrings):
|
||||||
itemList += self._doSearch(curString)
|
itemList += self._doSearch(curString)
|
||||||
|
|
||||||
# remove duplicate items
|
# 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:
|
for item in itemList:
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user