From eeb632fd0fd3363ed5854a800d4e06e11d0a2ece Mon Sep 17 00:00:00 2001 From: echel0n Date: Wed, 14 May 2014 15:28:44 -0700 Subject: [PATCH] Fix for search iteration issue --- sickbeard/search.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/sickbeard/search.py b/sickbeard/search.py index 2d700185..54442cca 100644 --- a/sickbeard/search.py +++ b/sickbeard/search.py @@ -326,8 +326,9 @@ def searchProviders(queueItem, show, season, episodes, seasonSearch=False, manua logger.ERROR) return queueItem + foundResults = {} for providerNum, provider in enumerate(providers): - foundResults = {provider.name: {}} + foundResults.setdefault(provider.name, {}) try: curResults = provider.findSearchResults(show, season, episodes, seasonSearch, manualSearch) @@ -426,7 +427,7 @@ def searchProviders(queueItem, show, season, episodes, seasonSearch=False, manua epNum = MULTI_EP_RESULT if epNum in foundResults[provider.name]: - foundResults[provider.name][epNum] += curResult + foundResults[provider.name][epNum].append(curResult) else: foundResults[provider.name][epNum] = [curResult] @@ -443,7 +444,7 @@ def searchProviders(queueItem, show, season, episodes, seasonSearch=False, manua epNum = MULTI_EP_RESULT if epNum in foundResults[provider.name]: - foundResults[provider.name][epNum] += bestSeasonNZB + foundResults[provider.name][epNum].append(bestSeasonNZB) else: foundResults[provider.name][epNum] = [bestSeasonNZB]