From 0b9b6228ae162c1d54ffa1fbf7399868b5ae533c Mon Sep 17 00:00:00 2001 From: echel0n Date: Sat, 17 May 2014 03:01:09 -0700 Subject: [PATCH] Fix for issues with fallback search option. Fix for issues with passwords. --- sickbeard/__init__.py | 6 +++--- sickbeard/search.py | 4 +++- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/sickbeard/__init__.py b/sickbeard/__init__.py index 008921f0..12ce19a3 100644 --- a/sickbeard/__init__.py +++ b/sickbeard/__init__.py @@ -1413,15 +1413,15 @@ def save_config(): if hasattr(curTorrentProvider, 'username'): new_config[curTorrentProvider.getID().upper()][curTorrentProvider.getID() + '_username'] = curTorrentProvider.username if hasattr(curTorrentProvider, 'password'): - new_config[curTorrentProvider.getID().upper()][curTorrentProvider.getID() + '_password'] = curTorrentProvider.password + new_config[curTorrentProvider.getID().upper()][curTorrentProvider.getID() + '_password'] = helpers.encrypt(curTorrentProvider.password, ENCRYPTION_VERSION) if hasattr(curTorrentProvider, 'confirmed'): - new_config[curTorrentProvider.getID().upper()][curTorrentProvider.getID() + '_confirmed'] = curTorrentProvider.confirmed + new_config[curTorrentProvider.getID().upper()][curTorrentProvider.getID() + '_confirmed'] = int(curTorrentProvider.confirmed) if hasattr(curTorrentProvider, 'ratio'): new_config[curTorrentProvider.getID().upper()][curTorrentProvider.getID() + '_ratio'] = float(curTorrentProvider.ratio) if hasattr(curTorrentProvider, 'options'): new_config[curTorrentProvider.getID().upper()][curTorrentProvider.getID() + '_options'] = curTorrentProvider.options if hasattr(curTorrentProvider, 'proxy'): - new_config[curTorrentProvider.getID().upper()][curTorrentProvider.getID() + '_proxy'] = curTorrentProvider.proxy.enabled + new_config[curTorrentProvider.getID().upper()][curTorrentProvider.getID() + '_proxy'] = int(curTorrentProvider.proxy.enabled) if hasattr(curTorrentProvider.proxy, 'url'): new_config[curTorrentProvider.getID().upper()][curTorrentProvider.getID() + '_proxy_url'] = curTorrentProvider.proxy.url if hasattr(curTorrentProvider, 'freeleech'): diff --git a/sickbeard/search.py b/sickbeard/search.py index baa63a59..73702496 100644 --- a/sickbeard/search.py +++ b/sickbeard/search.py @@ -360,9 +360,11 @@ def searchProviders(queueItem, show, season, episodes, manualSearch=False): logger.log(traceback.format_exc(), logger.DEBUG) continue - if len(searchResults) and not provider.search_fallback or searchCount == 2: + if len(searchResults): foundResults[provider.name] = filterSearchResults(show, searchResults) break + elif not provider.search_fallback or searchCount == 2: + break if search_mode == 'sponly': logger.log(u"FALLBACK EPISODE SEARCH INITIATED ...")