From: kaliko Date: Mon, 7 Jun 2021 13:09:06 +0000 (+0200) Subject: Fixed bad implementation of blocklist for albums X-Git-Tag: 0.18.0~38 X-Git-Url: https://git.kaliko.me/?a=commitdiff_plain;h=12d710d35febb030442322df99d851ad2da29704;p=mpd-sima.git Fixed bad implementation of blocklist for albums --- 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 ###