Fix issue with telling player to load delayedPath before it is ready (#352)

This commit is contained in:
et0h 2020-09-13 20:02:37 +01:00
parent d52096cc31
commit 4dd09c9de3
1 changed files with 5 additions and 0 deletions

View File

@ -1702,6 +1702,11 @@ class SyncplayPlaylist():
def loadDelayedPath(self, changeToIndex):
# Implementing the behaviour set out at https://github.com/Syncplay/syncplay/issues/315
if self._client.playerIsNotReady():
self._client.addPlayerReadyCallback(lambda x: self.loadDelayedPath(changeToIndex))
return
if self._client._protocol.hadFirstPlaylistIndex and self._client.delayedLoadPath:
delayedLoadPath = str(self._client.delayedLoadPath)
self._client.delayedLoadPath = None