diff --git a/CHANGES.md b/CHANGES.md index dd690142..9b7cb800 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -12,6 +12,12 @@ +### 0.12.5 (2017-01-16 16:22:00 UTC) + +* Change TD search URL +* Fix saving Media Providers when either Search NZBs/Torrents is disabled + + ### 0.12.4 (2016-12-31 00:50:00 UTC) * Remove Wombles nzb provider diff --git a/sickbeard/providers/torrentday.py b/sickbeard/providers/torrentday.py index 65c975d8..cac0ef36 100644 --- a/sickbeard/providers/torrentday.py +++ b/sickbeard/providers/torrentday.py @@ -31,7 +31,7 @@ class TorrentDayProvider(generic.TorrentProvider): self.url_home = ['https://%s/' % u for u in 'torrentday.eu', 'secure.torrentday.com', 'tdonline.org', 'torrentday.it', 'www.td.af', 'www.torrentday.com'] - self.url_vars = {'login': 'rss.php', 'search': 't?%s%s;q=%s%s', 'get': '%s'} + self.url_vars = {'login': 'rss.php', 'search': 'browse.php?cata=yes&%s%s&search=%s%s', 'get': '%s'} self.url_tmpl = {'config_provider_home_uri': '%(home)s', 'login': '%(home)s%(vars)s', 'search': '%(home)s%(vars)s', 'get': '%(home)s%(vars)s'} @@ -69,8 +69,8 @@ class TorrentDayProvider(generic.TorrentProvider): search_string = '+'.join(search_string.split()) search_url = self.urls['search'] % ( - self._categories_string(mode, '%s', ';'), (';free', '')[not self.freeleech], - search_string, (';o=seeders', '')['Cache' == mode]) + self._categories_string(mode), ('&free=on', '')[not self.freeleech], + search_string, ('&sort=7&type=desc', '')['Cache' == mode]) html = self.get_url(search_url) diff --git a/sickbeard/webserve.py b/sickbeard/webserve.py index 1c3fcb2a..c2558a38 100644 --- a/sickbeard/webserve.py +++ b/sickbeard/webserve.py @@ -5255,8 +5255,9 @@ class ConfigProviders(Config): active_ids.append(cur_id) # delete anything that is missing - for source in [x for x in sickbeard.newznabProviderList if x.get_id() not in active_ids]: - sickbeard.newznabProviderList.remove(source) + if sickbeard.USE_NZBS: + for source in [x for x in sickbeard.newznabProviderList if x.get_id() not in active_ids]: + sickbeard.newznabProviderList.remove(source) # add all the torrent RSS info we have into our list torrent_rss_sources = dict(zip([x.get_id() for x in sickbeard.torrentRssProviderList], @@ -5290,8 +5291,9 @@ class ConfigProviders(Config): active_ids.append(cur_id) # delete anything that is missing - for source in [x for x in sickbeard.torrentRssProviderList if x.get_id() not in active_ids]: - sickbeard.torrentRssProviderList.remove(source) + if sickbeard.USE_TORRENTS: + for source in [x for x in sickbeard.torrentRssProviderList if x.get_id() not in active_ids]: + sickbeard.torrentRssProviderList.remove(source) # enable/disable states of source providers provider_str_list = provider_order.split()