]> kaliko git repositories - mpd-sima.git/commitdiff
Avoid unnecessary method call
authorkaliko <efrim@azylum.org>
Sun, 2 Feb 2014 14:41:01 +0000 (15:41 +0100)
committerkaliko <efrim@azylum.org>
Sun, 2 Feb 2014 14:41:01 +0000 (15:41 +0100)
Call get_recursive_similar_artist() when useful

sima/plugins/internal/lastfm.py

index f8672d6c73880e72b9515ef7591815a55759b77d..28bb3a42a075bef56ac740105443ef1e2465e353 100644 (file)
@@ -235,7 +235,8 @@ class Lastfm(Plugin):
         ret = self.get_artists_from_player(similar)
         ret_extra = None
         if len(self.history) >= 2:
-            ret_extra = self.get_recursive_similar_artist()
+            if self.plugin_conf.getint('depth') > 1:
+                ret_extra = self.get_recursive_similar_artist()
         if ret_extra:
             ret = list(set(ret) | set(ret_extra))
         if not ret: