(self)
| 679 | self._controllers = {} |
| 680 | |
| 681 | def getPosition(self): |
| 682 | age = time.time() - self._lastUpdate |
| 683 | if self._controllers and age > 1: |
| 684 | watcher = min(self._controllers.values()) |
| 685 | self._setBy = watcher |
| 686 | self._position = watcher.getPosition() |
| 687 | self._lastUpdate = time.time() |
| 688 | return self._position |
| 689 | elif self._position is not None: |
| 690 | return self._position + (age if self._playState == self.STATE_PLAYING else 0) |
| 691 | else: |
| 692 | return 0 |
| 693 | |
| 694 | def addController(self, watcher): |
| 695 | self._controllers[watcher.getName()] = watcher |
nothing calls this directly
no test coverage detected