1
0
mirror of https://github.com/moparisthebest/SickRage synced 2024-12-12 11:02:21 -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:
echel0n 2014-12-11 13:26:00 -08:00
parent a14969f4bf
commit 7f0dd9cbef
5 changed files with 6 additions and 6 deletions

View File

@ -242,7 +242,7 @@ class KATProvider(generic.TorrentProvider):
id = item['guid']
title = item['title']
url = item['torrent_magnetURI']
verified = bool(item.get('torrent_verified', 0))
verified = bool(item['torrent_verified'] or 0)
seeders = int(item['torrent_seeds'])
leechers = int(item['torrent_peers'])
size = int(item['torrent_contentLength'])
@ -358,7 +358,7 @@ class KATCache(tvcache.TVCache):
searchURL = url + 'tv/?field=time_add&sorder=desc&rss=1'
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:
break

View File

@ -297,7 +297,7 @@ class NewznabProvider(generic.NZBProvider):
if not self._checkAuthFromData(data):
break
for item in data.get('entries', []):
for item in data['entries'] or []:
(title, url) = self._get_title_and_url(item)

View File

@ -60,7 +60,7 @@ class TvTorrentsProvider(generic.TorrentProvider):
return True
def _checkAuthFromData(self, data):
if not (data.get('entries') and data.get('feed')):
if not (data['entries'] and data['feed']):
return self._checkAuth()
try:

View File

@ -67,7 +67,7 @@ class WombleCache(tvcache.TVCache):
myDB.mass_action(cl)
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()

View File

@ -122,7 +122,7 @@ class TVCache():
self.setLastUpdate()
cl = []
for item in data.get('entries', []):
for item in data['entries'] or []:
ci = self._parseItem(item)
if ci is not None:
cl.append(ci)