Skip to content

Commit

Permalink
Avoid error when closing Syncplay before loadDelayedPath is complete
Browse files Browse the repository at this point in the history
  • Loading branch information
Et0h committed Mar 1, 2024
1 parent 899081c commit af08ff9
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions syncplay/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -1785,6 +1785,9 @@ def changeToPlaylistIndexFromFilename(self, filename):
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
Expand Down

0 comments on commit af08ff9

Please sign in to comment.