Don't try to load playlist file that does not exist

This commit is contained in:
et0h 2019-08-19 17:45:21 +01:00
parent 7d694797aa
commit 571326d501

View File

@ -1723,6 +1723,10 @@ class SyncplayPlaylist():
return filename
def loadPlaylistFromFile(self, path, shuffle=False):
if not os.path.isfile(path):
self._ui.showDebugMessage("Not loading {} as file could not be found".format(path))
return
with open(path) as f:
newPlaylist = f.read().splitlines()
if shuffle: