Fix server rewind position to 0 on pause bug

This commit is contained in:
Et0h 2016-02-07 13:10:56 +00:00
parent 0888ead8e6
commit 1194cce05a

View File

@ -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