From 1194cce05a4c54841fb42c3d9976698c1840d545 Mon Sep 17 00:00:00 2001 From: Et0h Date: Sun, 7 Feb 2016 13:10:56 +0000 Subject: [PATCH] Fix server rewind position to 0 on pause bug --- syncplay/server.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/syncplay/server.py b/syncplay/server.py index be86be0..cb26dc8 100644 --- a/syncplay/server.py +++ b/syncplay/server.py @@ -257,7 +257,7 @@ class Room(object): self.__lastUpdate = time.time() return self.__position else: - return self.__position + age if self._playState == self.STATE_PLAYING else 0 + return self.__position + (age if self._playState == self.STATE_PLAYING else 0) def setPaused(self, paused=STATE_PAUSED, setBy=None): self._playState = paused @@ -327,7 +327,7 @@ class ControlledRoom(Room): self.__lastUpdate = time.time() return self.__position else: - return self.__position + age if self._playState == self.STATE_PLAYING else 0 + return self.__position + (age if self._playState == self.STATE_PLAYING else 0) def addController(self, watcher): self._controllers[watcher.getName()] = watcher