Avoid error when closing Syncplay before loadDelayedPath is complete

This commit is contained in:
Et0h 2024-03-01 15:23:41 +00:00
parent 899081ca6e
commit af08ff9f80
1 changed files with 3 additions and 0 deletions

View File

@ -1785,6 +1785,9 @@ class SyncplayPlaylist():
def loadDelayedPath(self, changeToIndex):
# Implementing the behaviour set out at https://github.com/Syncplay/syncplay/issues/315
if not self._client:
return
if self._client.playerIsNotReady():
self._client.addPlayerReadyCallback(lambda x: self.loadDelayedPath(changeToIndex))
return