From cd424ec6780bc62990db058d5c2ed532b4f1c122 Mon Sep 17 00:00:00 2001 From: Et0h Date: Wed, 16 Nov 2016 17:29:25 +0000 Subject: [PATCH] Hopefully fix 'set not ready on playlist change' bug --- syncplay/client.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/syncplay/client.py b/syncplay/client.py index c18044a..6cfc930 100644 --- a/syncplay/client.py +++ b/syncplay/client.py @@ -496,6 +496,7 @@ class SyncplayClient(object): return False def openFile(self, filePath, resetPosition=False): + self.playlist.openedFile() self._player.openFile(filePath, resetPosition) if resetPosition: self.establishRewindDoubleCheck() @@ -1391,6 +1392,9 @@ class SyncplayPlaylist(): return f(self, *args, **kwds) return wrapper + def openedFile(self): + self._lastPlaylistIndexChange = time.time() + def changeToPlaylistIndexFromFilename(self, filename): try: index = self._playlist.index(filename) @@ -1570,6 +1574,7 @@ class SyncplayPlaylist(): return if len(self._playlist) == 1 and self._client.loopSingleFiles(): + self._lastPlaylistIndexChange = time.time() self._client.rewindFile() self._client.setPaused(False) reactor.callLater(0.5, self._client.setPaused, False,)