From 5ca239104442a40c4b3e26c1151d7dfd27339942 Mon Sep 17 00:00:00 2001 From: JackDandy Date: Mon, 7 Nov 2016 13:27:49 +0000 Subject: [PATCH] Change remove deprecated providers being saved to config. Change prevent a missing slash typo and correct develop typo after a network outage. --- CHANGES.md | 2 ++ sickbeard/__init__.py | 3 ++- sickbeard/providers/generic.py | 2 ++ 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGES.md b/CHANGES.md index 2cd546d3..c0415156 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -224,6 +224,8 @@ * Change retry sleep timeout for Trakt searches to prevent issues when Trakt is down * Fix TVDb search issue when only 1 result is returned * Change improve TvChaos item parsing and can use qualities instead of 'Unknown' +* Change remove deprecated providers being saved to config +* Change prevent a missing slash typo and correct develop typo after a network outage ### 0.11.16 (2016-10-16 17:30:00 UTC) diff --git a/sickbeard/__init__.py b/sickbeard/__init__.py index 770a8c34..ce0c0d01 100755 --- a/sickbeard/__init__.py +++ b/sickbeard/__init__.py @@ -1476,7 +1476,8 @@ def save_config(): new_config['General']['anime_default'] = int(ANIME_DEFAULT) new_config['General']['scene_default'] = int(SCENE_DEFAULT) new_config['General']['provider_order'] = ' '.join(PROVIDER_ORDER) - new_config['General']['provider_homes'] = '%s' % PROVIDER_HOMES + new_config['General']['provider_homes'] = '%s' % dict([(pid, v) for pid, v in PROVIDER_HOMES.items() if pid in [ + p.get_id() for p in [x for x in providers.sortedProviderList() if GenericProvider.TORRENT == x.providerType]]]) new_config['General']['version_notify'] = int(VERSION_NOTIFY) new_config['General']['auto_update'] = int(AUTO_UPDATE) new_config['General']['notify_on_update'] = int(NOTIFY_ON_UPDATE) diff --git a/sickbeard/providers/generic.py b/sickbeard/providers/generic.py index dcbb132f..ae0116e9 100644 --- a/sickbeard/providers/generic.py +++ b/sickbeard/providers/generic.py @@ -949,11 +949,13 @@ class TorrentProvider(object, GenericProvider): if not url_list and getattr(self, 'url_edit', None) or 10 > max([len(x) for x in url_list]): return None + url_list = ['%s/' % x.rstrip('/') for x in url_list] last_url, expire = sickbeard.PROVIDER_HOMES.get(self.get_id(), ('', None)) if 'site down' == last_url: if expire and (expire > int(time.time())): return None elif last_url: + last_url = last_url.replace('getrss.php', '/') # correct develop typo after a network outage (0.11>0.12) last_url in url_list and url_list.remove(last_url) url_list.insert(0, last_url)