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
|
||||
|
||||
def setPaused(self, value):
|
||||
if self._paused <> value:
|
||||
self._paused = not self._paused
|
||||
self._listener.sendLine('cycle pause')
|
||||
if value == False:
|
||||
self.lastMPVPositionUpdate = time.time()
|
||||
if self._paused == value:
|
||||
self._client.ui.showDebugMessage("Not sending setPaused to mpv as state is already {}".format(value))
|
||||
return
|
||||
pauseValue = "yes" if value else "no"
|
||||
self._setProperty("pause", pauseValue)
|
||||
self._paused = value
|
||||
if value == False:
|
||||
self.lastMPVPositionUpdate = time.time()
|
||||
|
||||
def _getProperty(self, property_):
|
||||
floatProperties = ['length','time-pos']
|
||||
@ -247,4 +250,4 @@ class NewMpvPlayer(OldMpvPlayer):
|
||||
if self.fileLoaded == True and self.lastLoadedTime != None and time.time() > (self.lastLoadedTime + constants.MPV_NEWFILE_IGNORE_TIME):
|
||||
return True
|
||||
else:
|
||||
return False
|
||||
return False
|
||||
Loading…
x
Reference in New Issue
Block a user