Don't error when trying to change to next playlist item on empty playlist

This commit is contained in:
Et0h 2015-10-02 09:25:30 +01:00
parent c16c220d1c
commit a81a4ceb16

View File

@ -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):