Skip to content

Commit

Permalink
monitor: If event is pause at 100%, set it to stop
Browse files Browse the repository at this point in the history
Workaround for syncplay.

Fixes #202
  • Loading branch information
iamkroot committed Apr 3, 2024
1 parent f432c10 commit a500ed9
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions trakt_scrobbler/player_monitors/monitor.py
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,11 @@ def scrobble_if_state_changed(self, prev, current):
logger.debug(f"action={action}")
if action == "scrobble":
logger.debug(current)
# Fix for syncplay, see #202
if current['progress'] == 100 and current['state'] == State.Paused:
logger.debug("Setting state to stopped. If you face duplicate scrobbles, raise a bug")
logger.debug(current)
current['state'] = State.Stopped
self.scrobble_status(current)
elif action == "stop_previous":
self.scrobble_queue.put(("stop", prev))
Expand Down

0 comments on commit a500ed9

Please sign in to comment.