setPause to set rather than cycle pause property for newMPV
This commit is contained in:
parent
e295b8ad41
commit
580af0c2c1
@ -110,11 +110,14 @@ class NewMpvPlayer(OldMpvPlayer):
|
|||||||
lastMPVPositionUpdate = None
|
lastMPVPositionUpdate = None
|
||||||
|
|
||||||
def setPaused(self, value):
|
def setPaused(self, value):
|
||||||
if self._paused <> value:
|
if self._paused == value:
|
||||||
self._paused = not self._paused
|
self._client.ui.showDebugMessage("Not sending setPaused to mpv as state is already {}".format(value))
|
||||||
self._listener.sendLine('cycle pause')
|
return
|
||||||
if value == False:
|
pauseValue = "yes" if value else "no"
|
||||||
self.lastMPVPositionUpdate = time.time()
|
self._setProperty("pause", pauseValue)
|
||||||
|
self._paused = value
|
||||||
|
if value == False:
|
||||||
|
self.lastMPVPositionUpdate = time.time()
|
||||||
|
|
||||||
def _getProperty(self, property_):
|
def _getProperty(self, property_):
|
||||||
floatProperties = ['length','time-pos']
|
floatProperties = ['length','time-pos']
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user