]> kaliko git repositories - mpd-sima.git/blobdiff - sima/plugins/internal/lastfm.py
Intercept missing artist in plugins' callback
[mpd-sima.git] / sima / plugins / internal / lastfm.py
index 3bae05eaf7761d6d5553f4c63b8a44103ee4c346..0cb3532477b7c59ec0b97d851e9f79dd1598993c 100644 (file)
@@ -342,7 +342,11 @@ class Lastfm(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