From 8830729c7f30c88c4042819f919fb80c3e288e68 Mon Sep 17 00:00:00 2001 From: Philipp Wolfer Date: Fri, 15 Sep 2023 08:05:59 +0200 Subject: [PATCH] deezerart: Extended debug logging for similarity mismatches --- plugins/deezerart/__init__.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/plugins/deezerart/__init__.py b/plugins/deezerart/__init__.py index 63a015fa..5dc24752 100644 --- a/plugins/deezerart/__init__.py +++ b/plugins/deezerart/__init__.py @@ -82,8 +82,8 @@ def queue_images(self): def error(self, msg): super().error(self._log_prefix + msg) - def log_debug(self, msg: Any): - picard.log.debug('%s%s', self._log_prefix, msg) + def log_debug(self, msg: Any, *args): + picard.log.debug(self._log_prefix + msg, *args) def _url_callback(self, url: str): if is_deezer_url(url): @@ -123,7 +123,11 @@ def _queue_from_search(self, results: List[obj.APIObject], error: Optional[QtNet for result in results: if not isinstance(result, obj.Track): continue - if not is_similar(artist, result.artist.name) or not is_similar(album, result.album.title): + if not is_similar(artist, result.artist.name): + self.log_debug('artist similarity below threshold: %r ~ %r', artist, result.artist.title) + continue + if not is_similar(album, result.album.title): + self.log_debug('album similarity below threshold: %r ~ %r', album, result.album.title) continue cover_url = result.album.cover_url(obj.CoverSize(config.setting['deezerart_size'])) self.queue_put(CoverArtImage(cover_url))