From d479fbfc5abff89144757df3b2e6add4726de384 Mon Sep 17 00:00:00 2001 From: JackDandy Date: Sun, 29 Mar 2015 03:27:59 +0100 Subject: [PATCH] Change improve backlog search. --- CHANGES.md | 3 ++- sickbeard/providers/btn.py | 10 ++++++---- sickbeard/providers/newznab.py | 12 +++++++----- 3 files changed, 15 insertions(+), 10 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index e1537f51..891a7aba 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -90,7 +90,8 @@ * Add show overview from indexers to the database * Fix case where start year or runtime is not available to display show * Add "File logging level" to General Config/Advanced Settings -* Fix saving of Sort By/Next Episode in Layout Poster on Show List page +* Fix saving of Sort By/Next Episode in Layout Poster on Show List page +* Change improve backlog search [develop changelog] * Fix traceback error when using the menu item Manage/Update Kodi diff --git a/sickbeard/providers/btn.py b/sickbeard/providers/btn.py index cb37eee4..f0884026 100644 --- a/sickbeard/providers/btn.py +++ b/sickbeard/providers/btn.py @@ -218,8 +218,9 @@ class BTNProvider(generic.TorrentProvider): set(scene_exceptions.get_scene_exceptions(ep_obj.show.indexerid) + [ep_obj.show.name])) for name in name_exceptions: # Search by name if we don't have tvdb or tvrage id - current_params['series'] = sanitizeSceneName(name) - search_params.append(current_params) + cur_return = current_params.copy() + cur_return['series'] = sanitizeSceneName(name) + search_params.append(cur_return) return search_params @@ -254,8 +255,9 @@ class BTNProvider(generic.TorrentProvider): name_exceptions = list( set(scene_exceptions.get_scene_exceptions(ep_obj.show.indexerid) + [ep_obj.show.name])) for cur_exception in name_exceptions: - search_params['series'] = sanitizeSceneName(cur_exception) - to_return.append(search_params) + cur_return = search_params.copy() + cur_return['series'] = sanitizeSceneName(cur_exception) + to_return.append(cur_return) return to_return diff --git a/sickbeard/providers/newznab.py b/sickbeard/providers/newznab.py index f75eba63..0b04ad9c 100755 --- a/sickbeard/providers/newznab.py +++ b/sickbeard/providers/newznab.py @@ -171,9 +171,10 @@ class NewznabProvider(generic.NZBProvider): name_exceptions = list( set(scene_exceptions.get_scene_exceptions(ep_obj.show.indexerid) + [ep_obj.show.name])) for cur_exception in name_exceptions: - if 'q' in cur_params: - cur_params['q'] = helpers.sanitizeSceneName(cur_exception) + '.' + cur_params['q'] - to_return.append(cur_params) + cur_return = cur_params.copy() + if 'q' in cur_return: + cur_return['q'] = helpers.sanitizeSceneName(cur_exception) + '.' + cur_return['q'] + to_return.append(cur_return) return to_return @@ -205,8 +206,9 @@ class NewznabProvider(generic.NZBProvider): name_exceptions = list( set(scene_exceptions.get_scene_exceptions(ep_obj.show.indexerid) + [ep_obj.show.name])) for cur_exception in name_exceptions: - params['q'] = helpers.sanitizeSceneName(cur_exception) - to_return.append(params) + cur_return = params.copy() + cur_return['q'] = helpers.sanitizeSceneName(cur_exception) + to_return.append(cur_return) if ep_obj.show.anime: # Experimental, add a searchstring without search explicitly for the episode!