mirror of https://github.com/Syncplay/syncplay
mpv: Preserve playback state when opening/closing a file
This commit is contained in:
parent
66e628eb89
commit
89ce72d6cb
|
@ -429,12 +429,12 @@ class MpvPlayer(BasePlayer):
|
|||
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()
|
||||
|
|
Loading…
Reference in New Issue