From dc18ba9e448fb1cebd75621d87df6c85c3538657 Mon Sep 17 00:00:00 2001 From: kaliko Date: Sun, 15 Nov 2015 23:36:36 +0100 Subject: [PATCH] Honors "single_album" options on already queued tracks --- sima/lib/webserv.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sima/lib/webserv.py b/sima/lib/webserv.py index 0845924..c3ecfd6 100644 --- a/sima/lib/webserv.py +++ b/sima/lib/webserv.py @@ -115,14 +115,14 @@ class WebService(Plugin): black_list = self.player.queue + self.to_add not_in_hist = list(set(tracks) - set(self.get_history(artist=artist))) if self.plugin_conf.get('queue_mode') != 'top' and not not_in_hist: - self.log.debug('All tracks already played for "{}"'.format(artist)) + self.log.debug('All tracks already played for "%s"', artist) random.shuffle(not_in_hist) candidate = [] for trk in [_ for _ in not_in_hist if _ not in black_list]: # Should use albumartist heuristic as well if self.plugin_conf.getboolean('single_album'): # pylint: disable=no-member if (trk.album == self.player.current.album or - trk.album in [tr.album for tr in self.to_add]): + trk.album in [tr.album for tr in black_list]): self.log.debug('Found unplayed track ' + 'but from an album already queued: %s', trk) continue -- 2.39.2