Remove unused lookup_table pytrakt_extension
MODIFY
plextraktsync/pytrakt_extensions.py
plextraktsync/pytrakt_extensions.py
from trakt.tv import TVEpisode
-@get
-def lookup_table(show):
- # returns all seasons and episodes with one single call
- data = yield "shows/{}/seasons?extended=episodes".format(show.trakt)
- retVal = {}
- for season in data:
- eps = {}
- if "episodes" in season.keys():
- for episode in season["episodes"]:
- eps[episode["number"]] = LazyEpisode(
- show, season["number"], episode["number"], episode["ids"]
- )
- retVal[season["number"]] = eps
- yield retVal
-
-
class LazyEpisode:
def __init__(self, show, season, number, ids):
self.show = show

Remove unused lookup_table pytrakt_extension