Skip to content

Commit

Permalink
Simplify from_watchlist method
Browse files Browse the repository at this point in the history
  • Loading branch information
glensc committed Feb 29, 2024
1 parent 93468ed commit 5f43ae8
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions plextraktsync/trakt/TraktUserList.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,7 @@ def from_trakt_list(cls, name: str, items: list[TraktPlayable]):

@classmethod
def from_watchlist(cls, items: list[TraktPlayable]):
trakt_items = dict(
zip([(elem.media_type, elem.trakt) for elem in items], count(1))
)
return cls(name="Trakt Watchlist", items=trakt_items)
return cls.from_trakt_list("Trakt Watchlist", items)

@cached_property
def plex_lists(self):
Expand Down

0 comments on commit 5f43ae8

Please sign in to comment.