Skip to content

Commit

Permalink
fixup! fixup! fixup! fixup! Implement sync_progress method
Browse files Browse the repository at this point in the history
  • Loading branch information
glensc committed Apr 7, 2024
1 parent d8b8e30 commit 46c5cb5
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions plextraktsync/sync/Sync.py
Original file line number Diff line number Diff line change
Expand Up @@ -252,10 +252,13 @@ def sync_progress(self, m: Media, dry_run=False):
return
progress = m.plex.progress_millis(p.progress)
if progress == 0.0:
self.logger.warning("Skip progress, setting to 0 will not work")
self.logger.warning(f"{m.title_link}: Skip progress, setting to 0 will not work", extra={"markup": True})
return

self.logger.info(f"{m}: Set watch progress to {p.progress:02F}%: {m.plex.item.viewOffset}ms -> {progress}ms")
self.logger.info(
f"{m.title_link}: Set watch progress to {p.progress:.02F}%: {m.plex.item.viewOffset}ms -> {progress}ms",
extra={"markup": True}
)
if not dry_run:
m.plex.item.updateProgress(progress)

Expand Down

0 comments on commit 46c5cb5

Please sign in to comment.