From 4dd09c9de3acfc1e90b56a4886c7afa563b4b81f Mon Sep 17 00:00:00 2001 From: et0h Date: Sun, 13 Sep 2020 20:02:37 +0100 Subject: [PATCH] Fix issue with telling player to load delayedPath before it is ready (#352) --- syncplay/client.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/syncplay/client.py b/syncplay/client.py index 83060ce..202cd3f 100755 --- a/syncplay/client.py +++ b/syncplay/client.py @@ -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