From 47ec78a3de8e2280849ec3ab70df3371514bf0ac Mon Sep 17 00:00:00 2001 From: kaliko Date: Sun, 2 Feb 2014 15:41:01 +0100 Subject: [PATCH] Avoid unnecessary method call Call get_recursive_similar_artist() when useful --- sima/plugins/internal/lastfm.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sima/plugins/internal/lastfm.py b/sima/plugins/internal/lastfm.py index f8672d6..28bb3a4 100644 --- a/sima/plugins/internal/lastfm.py +++ b/sima/plugins/internal/lastfm.py @@ -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: -- 2.39.5