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

Method openFile

syncplay/client.py:614–626  ·  view source on GitHub ↗
(self, filePath, resetPosition=False, fromUser=False)

Source from the content-addressed store, hash-verified

612 return trustable and trusted
613
614 def openFile(self, filePath, resetPosition=False, fromUser=False):
615 if not (filePath.startswith("http://") or filePath.startswith("https://"))\
616 and ((fromUser and filePath.endswith(".txt")) or filePath.endswith(".m3u") or filePath.endswith(".m3u8")):
617 self.playlist.loadPlaylistFromFile(filePath, resetPosition)
618 return
619
620 self.playlist.openedFile()
621 self._player.openFile(filePath, resetPosition)
622 if resetPosition:
623 self.rewindFile()
624 self.establishRewindDoubleCheck()
625 self.lastRewindTime = time.time()
626 self.autoplayCheck()
627
628 def fileSwitchFoundFiles(self):
629 self.ui.fileSwitchFoundFiles()

Callers 2

loadDelayedPathMethod · 0.45

Calls 5

rewindFileMethod · 0.95
autoplayCheckMethod · 0.95
loadPlaylistFromFileMethod · 0.80
openedFileMethod · 0.80

Tested by

no test coverage detected