Skip to content

Commit

Permalink
update trakt watched_movies list during scan
Browse files Browse the repository at this point in the history
  • Loading branch information
simonc56 committed Sep 7, 2021
1 parent 83ded35 commit 5c2c690
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion plex_trakt_sync/trakt_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,6 @@ def liked_lists(self):
return pytrakt_extensions.get_liked_lists()

@property
@memoize

This comment has been minimized.

Copy link
@glensc

glensc Sep 7, 2021

Collaborator

you absolutely need @memoize here, otherwise, each access of the property will return you new copy of the set().

@nocache
@rate_limit()
def watched_movies(self):
Expand Down Expand Up @@ -181,6 +180,7 @@ def scrobbler(media: Union[Movie, TVEpisode]) -> ScrobblerProxy:
@time_limit()
def mark_watched(self, m, time):
m.mark_as_seen(time)
self.watched_movies.add(m.trakt_id)

This comment has been minimized.

Copy link
@glensc

glensc Sep 7, 2021

Collaborator

as I said, your original code was correct, you need m.trakt as you used to have m here is not Media but Trakt Movie class.

you don't test your changes at all?


def add_to_collection(self, m, pm: PlexLibraryItem):
if m.media_type == "movies":
Expand Down

0 comments on commit 5c2c690

Please sign in to comment.