From 25fe4267200a1ea16598bf421fc4e470a2136125 Mon Sep 17 00:00:00 2001 From: Luigi311 Date: Sun, 26 Mar 2023 23:55:56 -0600 Subject: [PATCH] Plex: Implement partial play syncing --- src/plex.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/plex.py b/src/plex.py index 2ebc2e3..0f1e8f0 100644 --- a/src/plex.py +++ b/src/plex.py @@ -291,12 +291,10 @@ def update_user_watched(user, user_plex, library, videos, dryrun): else: logger(f"Dryrun {msg}", 0) elif video_status["time"] > 60_000: - # Only mark partially watched if watched for more than 1 minute - # TODO add support for partially watched movies msg = f"{movies_search.title} as partially watched for {floor(video_status['time'] / 60_000)} minutes for {user.title} in {library} for Plex" if not dryrun: logger(f"Marked {msg}", 0) - + movies_search.updateProgress(video_status["time"]) else: logger(f"Dryrun {msg}", 0) else: @@ -324,10 +322,10 @@ def update_user_watched(user, user_plex, library, videos, dryrun): else: logger(f"Dryrun {msg}", 0) else: - # TODO add support for partially watched episodes msg = f"{show_search.title} {episode_search.title} as partially watched for {floor(video_status['time'] / 60_000)} minutes for {user.title} in {library} for Plex" if not dryrun: logger(f"Marked {msg}", 0) + episode_search.updateProgress(video_status["time"]) else: logger(f"Dryrun {msg}", 0) else: