]> kaliko git repositories - mpd-sima.git/commitdiff
Append recursive search before !
authorkaliko <efrim@azylum.org>
Fri, 24 Jan 2014 08:53:23 +0000 (09:53 +0100)
committerkaliko <efrim@azylum.org>
Fri, 24 Jan 2014 08:53:23 +0000 (09:53 +0100)
Append recursive search before controlling emptiness of research

sima/plugins/internal/lastfm.py

index 8dccac980975245a0da2b600c77fd4736c9a2f02..f8672d6c73880e72b9515ef7591815a55759b77d 100644 (file)
@@ -236,12 +236,12 @@ class Lastfm(Plugin):
         ret_extra = None
         if len(self.history) >= 2:
             ret_extra = self.get_recursive_similar_artist()
+        if ret_extra:
+            ret = list(set(ret) | set(ret_extra))
         if not ret:
             self.log.warning('Got nothing from music library.')
             self.log.warning('Try running in debug mode to guess why...')
             return []
-        if ret_extra:
-            ret = list(set(ret) | set(ret_extra))
         self.log.info('Got {} artists in library'.format(len(ret)))
         self.log.info(' / '.join(ret))
         # Move around similars items to get in unplayed|not recently played