Skip to content

Commit

Permalink
fixup! fixup! Implement get_playback method
Browse files Browse the repository at this point in the history
  • Loading branch information
glensc committed Apr 6, 2024
1 parent 58fb031 commit 394717e
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions trakt/sync.py
Original file line number Diff line number Diff line change
Expand Up @@ -368,8 +368,16 @@ def get_playback(list_type=None, start_at=None, end_at=None):
if list_type:
uri += f"/{list_type}"

data = yield uri
results = data
items = yield uri
results = []
for item in items:
if "type" not in item:
continue
data = item.pop(item["type"])
if "show" in item:
data["show"] = item.pop("show")
results.append(PlaybackEntry(**item, data=data))

yield results


Expand Down

0 comments on commit 394717e

Please sign in to comment.