mirror of
https://github.com/SickGear/SickGear.git
synced 2024-12-11 21:53:37 +00:00
Fixes Torrent Leech daily search URL
Fixes TV torrents daily search no results
This commit is contained in:
parent
e6149513c8
commit
41931b33a9
2 changed files with 8 additions and 4 deletions
|
@ -45,6 +45,7 @@ class TorrentLeechProvider(generic.TorrentProvider):
|
||||||
'detail': 'https://torrentleech.org/torrent/%s',
|
'detail': 'https://torrentleech.org/torrent/%s',
|
||||||
'search': 'https://torrentleech.org/torrents/browse/index/query/%s/categories/%s',
|
'search': 'https://torrentleech.org/torrents/browse/index/query/%s/categories/%s',
|
||||||
'download': 'https://torrentleech.org%s',
|
'download': 'https://torrentleech.org%s',
|
||||||
|
'index': 'https://torrentleech.org/torrents/browse/index/categories/%s',
|
||||||
}
|
}
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
|
@ -163,6 +164,9 @@ class TorrentLeechProvider(generic.TorrentProvider):
|
||||||
if isinstance(search_string, unicode):
|
if isinstance(search_string, unicode):
|
||||||
search_string = unidecode(search_string)
|
search_string = unidecode(search_string)
|
||||||
|
|
||||||
|
if mode == 'RSS':
|
||||||
|
searchURL = self.urls['index'] % self.categories
|
||||||
|
else:
|
||||||
searchURL = self.urls['search'] % (search_string, self.categories)
|
searchURL = self.urls['search'] % (search_string, self.categories)
|
||||||
|
|
||||||
logger.log(u"Search string: " + searchURL, logger.DEBUG)
|
logger.log(u"Search string: " + searchURL, logger.DEBUG)
|
||||||
|
@ -203,7 +207,7 @@ class TorrentLeechProvider(generic.TorrentProvider):
|
||||||
continue
|
continue
|
||||||
|
|
||||||
item = title, download_url, id, seeders, leechers
|
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)
|
items[mode].append(item)
|
||||||
|
|
||||||
|
|
|
@ -95,8 +95,8 @@ class TvTorrentsCache(tvcache.TVCache):
|
||||||
if not self.provider._checkAuthFromData(data):
|
if not self.provider._checkAuthFromData(data):
|
||||||
return []
|
return []
|
||||||
|
|
||||||
if data and 'data' in data:
|
if data and 'entries' in data:
|
||||||
return data['data']
|
return data['entries']
|
||||||
else:
|
else:
|
||||||
return []
|
return []
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue