mirror of
https://github.com/moparisthebest/SickRage
synced 2024-12-04 15:12:23 -05:00
Small code fix for trakt.tv trending shows func
Fixes for Indexer API's
This commit is contained in:
parent
29d22b8a8f
commit
a18c72f2ea
@ -939,7 +939,7 @@ class Tvdb:
|
||||
# Item is integer, treat as show id
|
||||
if key not in self.shows:
|
||||
self._getShowData(key, self.config['language'], True)
|
||||
return self.shows[key]
|
||||
return (None, self.shows[key])[key in self.shows]
|
||||
|
||||
key = str(key).lower()
|
||||
self.config['searchterm'] = key
|
||||
|
@ -663,7 +663,7 @@ class TVRage:
|
||||
# Item is integer, treat as show id
|
||||
if key not in self.shows:
|
||||
self._getShowData(key, True)
|
||||
return self.shows[key]
|
||||
return (None, self.shows[key])[key in self.shows]
|
||||
|
||||
key = key.lower()
|
||||
self.config['searchterm'] = key
|
||||
|
@ -3007,8 +3007,11 @@ class NewHomeAddShows(MainHandler):
|
||||
trending_shows = TraktCall("shows/trending.json/%API%", sickbeard.TRAKT_API_KEY)
|
||||
if trending_shows:
|
||||
for show in trending_shows:
|
||||
if not helpers.findCertainShow(sickbeard.showList, [int(show['tvdb_id']), int(show['tvrage_id'])]):
|
||||
t.trending_shows += [show]
|
||||
try:
|
||||
if not helpers.findCertainShow(sickbeard.showList, [int(show['tvdb_id']), int(show['tvrage_id'])]):
|
||||
t.trending_shows += [show]
|
||||
except exceptions.MultipleShowObjectsException:
|
||||
continue
|
||||
|
||||
return _munge(t)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user