Use global position when local position is unavailable from VLC

This commit is contained in:
Et0h 2015-03-27 16:31:20 +00:00
parent d9f10a5ac3
commit 54cb27dc96

View File

@ -96,7 +96,7 @@ class VlcPlayer(BasePlayer):
def getCalculatedPosition(self):
if self._lastVLCPositionUpdate is None:
return 0
return self._client.getGlobalPosition()
diff = time.time() - self._lastVLCPositionUpdate
if diff > constants.PLAYER_ASK_DELAY and not self._paused:
return self._position + diff