Skip to content

Commit

Permalink
mpv: Preserve playback state when opening/closing a file
Browse files Browse the repository at this point in the history
  • Loading branch information
Et0h authored May 27, 2020
1 parent 66e628e commit 89ce72d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions syncplay/players/mpv.py
Original file line number Diff line number Diff line change
Expand Up @@ -429,12 +429,12 @@ def _handleUnknownLine(self, line):
paused_update = update_string[2]
position_update = update_string[4]
if paused_update == "nil":
self._storePauseState(True)
self._storePauseState(float(self._client.getGlobalPaused()))
else:
self._storePauseState(bool(paused_update == 'true'))
self._pausedAsk.set()
if position_update == "nil":
self._storePosition(float(0))
self._storePosition(float(self._client.getGlobalPosition()))
else:
self._storePosition(float(position_update))
self._positionAsk.set()
Expand Down

0 comments on commit 89ce72d

Please sign in to comment.