MCPcopy Create free account
hub / github.com/Syncplay/syncplay / _onFileUpdate

Method _onFileUpdate

syncplay/players/mpv.py:494–504  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

492 return False
493
494 def _onFileUpdate(self):
495 self._client.ui.showDebugMessage("File update")
496 self.fileLoaded = True
497 self.lastLoadedTime = time.time()
498 self.reactor.callFromThread(self._client.updateFile, self._filename, self._duration, self._filepath)
499 if not (self._recentlyReset()):
500 self._client.ui.showDebugMessage("onFileUpdate setting position to global position: {}".format(self._client.getGlobalPosition()))
501 self.reactor.callFromThread(self.setPosition, self._client.getGlobalPosition())
502 if self._paused != self._client.getGlobalPaused():
503 self._client.ui.showDebugMessage("onFileUpdate setting position to global paused: {}".format(self._client.getGlobalPaused()))
504 self.reactor.callFromThread(self._client.getGlobalPaused)
505
506 def _fileIsLoaded(self, ignoreDelay=False):
507 if ignoreDelay:

Callers 1

_handleUnknownLineMethod · 0.95

Calls 4

_recentlyResetMethod · 0.95
getGlobalPositionMethod · 0.80
getGlobalPausedMethod · 0.80
showDebugMessageMethod · 0.45

Tested by

no test coverage detected