mpv: Preserve playback state when opening/closing a file

This commit is contained in:
Etoh 2020-05-27 18:33:07 +01:00 committed by GitHub
parent 66e628eb89
commit 89ce72d6cb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -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()