]> kaliko git repositories - mpd-sima.git/blobdiff - sima/lib/webserv.py
Fixed crash when player.find_tracks returns nothing
[mpd-sima.git] / sima / lib / webserv.py
index ca6b1f095b9b2d6499c9a384ca73218a0f348338..a0b899a3f624f82fdbc2f1b45f9e956574b82d9b 100644 (file)
@@ -259,6 +259,8 @@ class WebService(AdvancedPlugin):
                 continue
             nb_album_add += 1
             candidates = self.player.find_tracks(album)
+            if not candidates:
+                continue
             if self.plugin_conf.getboolean('shuffle_album'):
                 random.shuffle(candidates)
             # this allows to select a maximum number of track from the album