]> kaliko git repositories - mpd-sima.git/blobdiff - sima/plugins/internal/echonest.py
Intercept missing artist in plugins' callback
[mpd-sima.git] / sima / plugins / internal / echonest.py
index b2971db4cbe1eb578ef95d31416cbcc7b338f3e9..4cd2f1d69b41171feaa728dfc7d469431133d6a3 100644 (file)
@@ -336,7 +336,11 @@ class EchoNest(Plugin):
     def callback_need_track(self):
         self._cleanup_cache()
         if not self.player.current:
-            self.log.info('Not currently playing track, cannot queue')
+            self.log.info('No current track, cannot queue')
+            return None
+        if not self.player.current.artist:
+            self.log.warning('No artist set for the current track')
+            self.log.debug(repr(self.player.current))
             return None
         self.queue_mode()
         candidates = self.to_add