mirror of
https://github.com/moparisthebest/SickRage
synced 2024-12-13 03:22:22 -05:00
Fixed small cosmetic bug with trakt trending shows page.
KAT torrent provider now gets and stores size and publishing date info. Fixed feedcache issue with KAT torrent provider
This commit is contained in:
parent
a14969f4bf
commit
7f0dd9cbef
@ -242,7 +242,7 @@ class KATProvider(generic.TorrentProvider):
|
|||||||
id = item['guid']
|
id = item['guid']
|
||||||
title = item['title']
|
title = item['title']
|
||||||
url = item['torrent_magnetURI']
|
url = item['torrent_magnetURI']
|
||||||
verified = bool(item.get('torrent_verified', 0))
|
verified = bool(item['torrent_verified'] or 0)
|
||||||
seeders = int(item['torrent_seeds'])
|
seeders = int(item['torrent_seeds'])
|
||||||
leechers = int(item['torrent_peers'])
|
leechers = int(item['torrent_peers'])
|
||||||
size = int(item['torrent_contentLength'])
|
size = int(item['torrent_contentLength'])
|
||||||
@ -358,7 +358,7 @@ class KATCache(tvcache.TVCache):
|
|||||||
searchURL = url + 'tv/?field=time_add&sorder=desc&rss=1'
|
searchURL = url + 'tv/?field=time_add&sorder=desc&rss=1'
|
||||||
logger.log(u"KAT cache update URL: " + searchURL, logger.DEBUG)
|
logger.log(u"KAT cache update URL: " + searchURL, logger.DEBUG)
|
||||||
|
|
||||||
data = self.getRSSFeed(url, items=['entries', 'feed'])['entries']
|
data = self.getRSSFeed(url, items=['entries', 'feed'])
|
||||||
if data and len(data) > 0:
|
if data and len(data) > 0:
|
||||||
break
|
break
|
||||||
|
|
||||||
|
@ -297,7 +297,7 @@ class NewznabProvider(generic.NZBProvider):
|
|||||||
if not self._checkAuthFromData(data):
|
if not self._checkAuthFromData(data):
|
||||||
break
|
break
|
||||||
|
|
||||||
for item in data.get('entries', []):
|
for item in data['entries'] or []:
|
||||||
|
|
||||||
(title, url) = self._get_title_and_url(item)
|
(title, url) = self._get_title_and_url(item)
|
||||||
|
|
||||||
|
@ -60,7 +60,7 @@ class TvTorrentsProvider(generic.TorrentProvider):
|
|||||||
return True
|
return True
|
||||||
|
|
||||||
def _checkAuthFromData(self, data):
|
def _checkAuthFromData(self, data):
|
||||||
if not (data.get('entries') and data.get('feed')):
|
if not (data['entries'] and data['feed']):
|
||||||
return self._checkAuth()
|
return self._checkAuth()
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
@ -67,7 +67,7 @@ class WombleCache(tvcache.TVCache):
|
|||||||
myDB.mass_action(cl)
|
myDB.mass_action(cl)
|
||||||
|
|
||||||
def _checkAuth(self, data):
|
def _checkAuth(self, data):
|
||||||
return data if data.get('feed') and data['feed']['title'] != 'Invalid Link' else None
|
return data if data['feed'] and data['feed']['title'] != 'Invalid Link' else None
|
||||||
|
|
||||||
provider = WombleProvider()
|
provider = WombleProvider()
|
||||||
|
|
||||||
|
@ -122,7 +122,7 @@ class TVCache():
|
|||||||
self.setLastUpdate()
|
self.setLastUpdate()
|
||||||
|
|
||||||
cl = []
|
cl = []
|
||||||
for item in data.get('entries', []):
|
for item in data['entries'] or []:
|
||||||
ci = self._parseItem(item)
|
ci = self._parseItem(item)
|
||||||
if ci is not None:
|
if ci is not None:
|
||||||
cl.append(ci)
|
cl.append(ci)
|
||||||
|
Loading…
Reference in New Issue
Block a user