From a81a4ceb16336291f1642a63e4919f7184f96150 Mon Sep 17 00:00:00 2001 From: Et0h Date: Fri, 2 Oct 2015 09:25:30 +0100 Subject: [PATCH] Don't error when trying to change to next playlist item on empty playlist --- syncplay/client.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/syncplay/client.py b/syncplay/client.py index edc467e..56e40af 100644 --- a/syncplay/client.py +++ b/syncplay/client.py @@ -168,7 +168,7 @@ class SyncplayClient(object): def loadNextFileInPlaylist(self): # TODO: Fix for GUIDs & add path checks (and make more of code re-use?) - if len(self._playlist) == self._playlistIndex+1: + if self._playlistIndex is None or len(self._playlist) == self._playlistIndex+1: return filename = self._playlist[self._playlistIndex+1] if utils.isURL(filename):