mirror of
https://github.com/moparisthebest/SickRage
synced 2024-11-10 19:35:08 -05:00
Merge pull request #715 from adam111316/even_more_cache_fixes
Fixes even more daily search issues
This commit is contained in:
commit
a9f15f9629
@ -45,6 +45,7 @@ class TorrentLeechProvider(generic.TorrentProvider):
|
||||
'detail': 'https://torrentleech.org/torrent/%s',
|
||||
'search': 'https://torrentleech.org/torrents/browse/index/query/%s/categories/%s',
|
||||
'download': 'https://torrentleech.org%s',
|
||||
'index': 'https://torrentleech.org/torrents/browse/index/categories/%s',
|
||||
}
|
||||
|
||||
def __init__(self):
|
||||
@ -163,7 +164,10 @@ class TorrentLeechProvider(generic.TorrentProvider):
|
||||
if isinstance(search_string, unicode):
|
||||
search_string = unidecode(search_string)
|
||||
|
||||
searchURL = self.urls['search'] % (search_string, self.categories)
|
||||
if mode == 'RSS':
|
||||
searchURL = self.urls['index'] % self.categories
|
||||
else:
|
||||
searchURL = self.urls['search'] % (search_string, self.categories)
|
||||
|
||||
logger.log(u"Search string: " + searchURL, logger.DEBUG)
|
||||
|
||||
@ -203,7 +207,7 @@ class TorrentLeechProvider(generic.TorrentProvider):
|
||||
continue
|
||||
|
||||
item = title, download_url, id, seeders, leechers
|
||||
logger.log(u"Found result: " + title + "(" + searchURL + ")", logger.DEBUG)
|
||||
logger.log(u"Found result: " + title + "(" + download_url + ")", logger.DEBUG)
|
||||
|
||||
items[mode].append(item)
|
||||
|
||||
|
@ -95,8 +95,8 @@ class TvTorrentsCache(tvcache.TVCache):
|
||||
if not self.provider._checkAuthFromData(data):
|
||||
return []
|
||||
|
||||
if data and 'data' in data:
|
||||
return data['data']
|
||||
if data and 'entries' in data:
|
||||
return data['entries']
|
||||
else:
|
||||
return []
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user