Take watched_at from PartialTraktMedia
MODIFY
plextraktsync/queue/TraktMarkWatchedWorker.py
plextraktsync/queue/TraktMarkWatchedWorker.py
@@ -45,10 +45,10 @@ def add_to_history(self, items: Dict):
@staticmethod
def normalize(items: List):
result = defaultdict(list)
- for (m, watched_at) in items:
+ for m in items:
result[m.media_type].append({
"ids": m.ids["ids"],
- "watched_at": watched_at,
+ "watched_at": m.watched_at,
})
return result

MODIFY
plextraktsync/trakt/TraktApi.py
plextraktsync/trakt/TraktApi.py
@@ -174,7 +174,7 @@ def mark_watched(self, m: TraktMedia, time, show_trakt_id=None):
# Add partial object to conserve memory
partial = PartialTraktMedia.create(m, watched_at=time)
- self.queue.add_to_history((partial, time))
+ self.queue.add_to_history(partial)
def add_to_collection(self, m, pm: PlexLibraryItem):
if m.media_type == "movies":

Take watched_at from PartialTraktMedia