From 65b80caf0944cb56a02b56b616d0da2ca4fcd519 Mon Sep 17 00:00:00 2001 From: Uriziel Date: Wed, 23 Jul 2014 22:47:07 +0200 Subject: [PATCH] Fixed mplayer episode switch and hacked seeking issue on file switch / syncplay start --- syncplay/players/mplayer.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/syncplay/players/mplayer.py b/syncplay/players/mplayer.py index ec532fc..9c9fa08 100644 --- a/syncplay/players/mplayer.py +++ b/syncplay/players/mplayer.py @@ -1,6 +1,7 @@ import subprocess import re import threading +import time from syncplay.players.basePlayer import BasePlayer from syncplay import constants from syncplay.messages import getMessage @@ -88,13 +89,14 @@ class MplayerPlayer(BasePlayer): def openFile(self, filePath): self._listener.sendLine(u'loadfile {}'.format(self._quoteArg(filePath))) self._onFileUpdate() - if self._client.getGlobalPaused(): - self._listener.sendLine('pause') + if self._paused != self._client.getGlobalPaused(): + self.setPaused(self._client.getGlobalPaused()) self.setPosition(self._client.getGlobalPosition()) def setPosition(self, value): self._position = value self._setProperty(self.POSITION_QUERY, "{}".format(value)) + time.sleep(0.03) def setPaused(self, value): if self._paused <> value: