X-Git-Url: http://git.kaliko.me/?a=blobdiff_plain;ds=sidebyside;f=sima%2Fplugins%2Finternal%2Flastfm.py;h=c5a772f5b763552961854bda1787a90a9aad0867;hb=2d4111ef3e3eb3811df95b139aac66b61c3ad5bf;hp=bff015b5550d151b855c533e541ee73e0aecf682;hpb=add1bca205eb064366eb2a8cde436f47c0fc25a2;p=mpd-sima.git diff --git a/sima/plugins/internal/lastfm.py b/sima/plugins/internal/lastfm.py index bff015b..c5a772f 100644 --- a/sima/plugins/internal/lastfm.py +++ b/sima/plugins/internal/lastfm.py @@ -142,6 +142,13 @@ class Lastfm(Plugin): if self.sdb.get_bl_album(trk, add_not=True): self.log.info('Blacklisted album: {0}: '.format(trk)) continue + # Should use albumartist heuristic as well + if self.plugin_conf.getboolean('single_album'): + if (trk.album == self.player.current.album or + trk.album in [trk.alb for trk in self.to_add]): + self.log.debug('Found unplayed track ' + + 'but from an album already queued: %s' % (trk)) + continue candidate.append(trk) if not candidate: self.log.debug('Unable to find title to add' +