From: kaliko Date: Fri, 24 Jan 2014 08:53:23 +0000 (+0100) Subject: Append recursive search before ! X-Git-Tag: mpd-sima/0.12.0pr3~25 X-Git-Url: https://git.kaliko.me/?a=commitdiff_plain;h=209c5b43440f09c7183c3cf6b9f6fc176f9b51b7;p=mpd-sima.git Append recursive search before ! Append recursive search before controlling emptiness of research --- diff --git a/sima/plugins/internal/lastfm.py b/sima/plugins/internal/lastfm.py index 8dccac9..f8672d6 100644 --- a/sima/plugins/internal/lastfm.py +++ b/sima/plugins/internal/lastfm.py @@ -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