Skip to content

Commit

Permalink
fixup! Return early in TraktApi.rating()
Browse files Browse the repository at this point in the history
  • Loading branch information
glensc committed Jan 4, 2023
1 parent a751e66 commit 0789401
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions plextraktsync/trakt/TraktApi.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,8 +150,7 @@ def rating(self, m) -> Optional[int]:
if m.media_type not in ["movies", "shows", "episodes"]:
raise ValueError(f"Unsupported type: {m.media_type}")

r = self.ratings[m.media_type]
return r.get(m.trakt, None)
return self.ratings[m.media_type].get(m.trakt, None)

@rate_limit()
@retry()
Expand Down

0 comments on commit 0789401

Please sign in to comment.