Merge pull request #823 from JackDandy/feature/ChangeConfigFilter

Change remove deprecated providers being saved to config.
This commit is contained in:
JackDandy 2016-11-07 17:47:54 +00:00 committed by GitHub
commit 89a2405c99
3 changed files with 6 additions and 1 deletions

View file

@ -224,6 +224,8 @@
* Change retry sleep timeout for Trakt searches to prevent issues when Trakt is down * Change retry sleep timeout for Trakt searches to prevent issues when Trakt is down
* Fix TVDb search issue when only 1 result is returned * Fix TVDb search issue when only 1 result is returned
* Change improve TvChaos item parsing and can use qualities instead of 'Unknown' * 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) ### 0.11.16 (2016-10-16 17:30:00 UTC)

View file

@ -1476,7 +1476,8 @@ def save_config():
new_config['General']['anime_default'] = int(ANIME_DEFAULT) new_config['General']['anime_default'] = int(ANIME_DEFAULT)
new_config['General']['scene_default'] = int(SCENE_DEFAULT) new_config['General']['scene_default'] = int(SCENE_DEFAULT)
new_config['General']['provider_order'] = ' '.join(PROVIDER_ORDER) 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']['version_notify'] = int(VERSION_NOTIFY)
new_config['General']['auto_update'] = int(AUTO_UPDATE) new_config['General']['auto_update'] = int(AUTO_UPDATE)
new_config['General']['notify_on_update'] = int(NOTIFY_ON_UPDATE) new_config['General']['notify_on_update'] = int(NOTIFY_ON_UPDATE)

View file

@ -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]): if not url_list and getattr(self, 'url_edit', None) or 10 > max([len(x) for x in url_list]):
return None return None
url_list = ['%s/' % x.rstrip('/') for x in url_list]
last_url, expire = sickbeard.PROVIDER_HOMES.get(self.get_id(), ('', None)) last_url, expire = sickbeard.PROVIDER_HOMES.get(self.get_id(), ('', None))
if 'site down' == last_url: if 'site down' == last_url:
if expire and (expire > int(time.time())): if expire and (expire > int(time.time())):
return None return None
elif last_url: 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) last_url in url_list and url_list.remove(last_url)
url_list.insert(0, last_url) url_list.insert(0, last_url)