From 12d710d35febb030442322df99d851ad2da29704 Mon Sep 17 00:00:00 2001 From: kaliko Date: Mon, 7 Jun 2021 15:09:06 +0200 Subject: [PATCH] Fixed bad implementation of blocklist for albums --- sima/mpdclient.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/sima/mpdclient.py b/sima/mpdclient.py index 0883b00..92ca0ce 100644 --- a/sima/mpdclient.py +++ b/sima/mpdclient.py @@ -517,6 +517,8 @@ class MPD(MPDClient): candidates = [] for album in albums: album_trks = self.find_tracks(album) + if not album_trks: # find_track result can be empty, blocklist applied + continue album_artists = {tr.albumartist for tr in album_trks if tr.albumartist} if album.Artist.names & album_artists: candidates.append(album) @@ -548,9 +550,6 @@ class MPD(MPDClient): self.log.debug('"%s" probably not an album of "%s" (ratio=%.2f)', album, artist, ratio) continue - for alb in albums: - if self.database.get_bl_album(album, add=False): - candidates.remove(album) return candidates # #### / Search Methods ### -- 2.39.5