mirror of
https://github.com/Syncplay/syncplay
synced 2024-12-16 11:55:11 +00:00
Fix server rewind position to 0 on pause bug
This commit is contained in:
parent
0888ead8e6
commit
1194cce05a
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user