Only walk lists if they are populated.

This commit is contained in:
Nils Vogels 2014-05-04 23:20:04 +02:00
parent 363db60a3d
commit e475d2a22d

View file

@ -250,13 +250,16 @@ 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:]]
if len(searchString):
searchStrings = [i for n, i in enumerate(searchStrings) if i not in searchStrings[n + 1:]]
for curString in sorted(searchStrings):
itemList += self._doSearch(curString)
# remove duplicate items
itemList = list(set(itemList))
if len(itemLisT):
itemList = list(set(itemList))
for item in itemList:
(title, url) = self._get_title_and_url(item)