X-Git-Url: http://git.kaliko.me/?a=blobdiff_plain;f=sima%2Fplugins%2Finternal%2Flastfm.py;h=28bb3a42a075bef56ac740105443ef1e2465e353;hb=47ec78a3de8e2280849ec3ab70df3371514bf0ac;hp=8dccac980975245a0da2b600c77fd4736c9a2f02;hpb=808c3bab5145b16b314ab330a054284bc0811623;p=mpd-sima.git diff --git a/sima/plugins/internal/lastfm.py b/sima/plugins/internal/lastfm.py index 8dccac9..28bb3a4 100644 --- a/sima/plugins/internal/lastfm.py +++ b/sima/plugins/internal/lastfm.py @@ -235,13 +235,14 @@ 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: 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