From 235a5d0161fdea6f78df2ff8132ca47a7e35421c Mon Sep 17 00:00:00 2001 From: echel0n Date: Sun, 4 May 2014 20:13:10 -0700 Subject: [PATCH] Fixes empty searchStrings and empty itemList issues if they happened. --- sickbeard/providers/generic.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sickbeard/providers/generic.py b/sickbeard/providers/generic.py index 6facb54e..94c5eee6 100644 --- a/sickbeard/providers/generic.py +++ b/sickbeard/providers/generic.py @@ -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: