mirror of
https://github.com/SickGear/SickGear.git
synced 2025-01-07 10:33:38 +00:00
Change TD search URL and fix saving Media Providers when either Search NZBs/Torrent is disabled.
This commit is contained in:
parent
89efdc6f75
commit
160f7a552b
3 changed files with 16 additions and 8 deletions
|
@ -1,4 +1,10 @@
|
||||||
### 0.12.4 (2016-12-31 00:50:00 UTC)
|
### 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
|
* Remove Wombles nzb provider
|
||||||
|
|
||||||
|
|
|
@ -31,7 +31,7 @@ class TorrentDayProvider(generic.TorrentProvider):
|
||||||
self.url_home = ['https://%s/' % u for u in 'torrentday.eu', 'secure.torrentday.com', 'tdonline.org',
|
self.url_home = ['https://%s/' % u for u in 'torrentday.eu', 'secure.torrentday.com', 'tdonline.org',
|
||||||
'torrentday.it', 'www.td.af', 'www.torrentday.com']
|
'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',
|
self.url_tmpl = {'config_provider_home_uri': '%(home)s', 'login': '%(home)s%(vars)s',
|
||||||
'search': '%(home)s%(vars)s', 'get': '%(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_string = '+'.join(search_string.split())
|
||||||
|
|
||||||
search_url = self.urls['search'] % (
|
search_url = self.urls['search'] % (
|
||||||
self._categories_string(mode, '%s', ';'), (';free', '')[not self.freeleech],
|
self._categories_string(mode), ('&free=on', '')[not self.freeleech],
|
||||||
search_string, (';o=seeders', '')['Cache' == mode])
|
search_string, ('&sort=7&type=desc', '')['Cache' == mode])
|
||||||
|
|
||||||
html = self.get_url(search_url)
|
html = self.get_url(search_url)
|
||||||
|
|
||||||
|
|
|
@ -5252,8 +5252,9 @@ class ConfigProviders(Config):
|
||||||
active_ids.append(cur_id)
|
active_ids.append(cur_id)
|
||||||
|
|
||||||
# delete anything that is missing
|
# delete anything that is missing
|
||||||
for source in [x for x in sickbeard.newznabProviderList if x.get_id() not in active_ids]:
|
if sickbeard.USE_NZBS:
|
||||||
sickbeard.newznabProviderList.remove(source)
|
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
|
# add all the torrent RSS info we have into our list
|
||||||
torrent_rss_sources = dict(zip([x.get_id() for x in sickbeard.torrentRssProviderList],
|
torrent_rss_sources = dict(zip([x.get_id() for x in sickbeard.torrentRssProviderList],
|
||||||
|
@ -5287,8 +5288,9 @@ class ConfigProviders(Config):
|
||||||
active_ids.append(cur_id)
|
active_ids.append(cur_id)
|
||||||
|
|
||||||
# delete anything that is missing
|
# delete anything that is missing
|
||||||
for source in [x for x in sickbeard.torrentRssProviderList if x.get_id() not in active_ids]:
|
if sickbeard.USE_TORRENTS:
|
||||||
sickbeard.torrentRssProviderList.remove(source)
|
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
|
# enable/disable states of source providers
|
||||||
provider_str_list = provider_order.split()
|
provider_str_list = provider_order.split()
|
||||||
|
|
Loading…
Reference in a new issue