Fixed mplayer episode switch and hacked seeking issue on file switch / syncplay start
This commit is contained in:
parent
c522665721
commit
65b80caf09
@ -1,6 +1,7 @@
|
|||||||
import subprocess
|
import subprocess
|
||||||
import re
|
import re
|
||||||
import threading
|
import threading
|
||||||
|
import time
|
||||||
from syncplay.players.basePlayer import BasePlayer
|
from syncplay.players.basePlayer import BasePlayer
|
||||||
from syncplay import constants
|
from syncplay import constants
|
||||||
from syncplay.messages import getMessage
|
from syncplay.messages import getMessage
|
||||||
@ -88,13 +89,14 @@ class MplayerPlayer(BasePlayer):
|
|||||||
def openFile(self, filePath):
|
def openFile(self, filePath):
|
||||||
self._listener.sendLine(u'loadfile {}'.format(self._quoteArg(filePath)))
|
self._listener.sendLine(u'loadfile {}'.format(self._quoteArg(filePath)))
|
||||||
self._onFileUpdate()
|
self._onFileUpdate()
|
||||||
if self._client.getGlobalPaused():
|
if self._paused != self._client.getGlobalPaused():
|
||||||
self._listener.sendLine('pause')
|
self.setPaused(self._client.getGlobalPaused())
|
||||||
self.setPosition(self._client.getGlobalPosition())
|
self.setPosition(self._client.getGlobalPosition())
|
||||||
|
|
||||||
def setPosition(self, value):
|
def setPosition(self, value):
|
||||||
self._position = value
|
self._position = value
|
||||||
self._setProperty(self.POSITION_QUERY, "{}".format(value))
|
self._setProperty(self.POSITION_QUERY, "{}".format(value))
|
||||||
|
time.sleep(0.03)
|
||||||
|
|
||||||
def setPaused(self, value):
|
def setPaused(self, value):
|
||||||
if self._paused <> value:
|
if self._paused <> value:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user