Skip to content

Commit

Permalink
deezerart: Extended debug logging for similarity mismatches
Browse files Browse the repository at this point in the history
  • Loading branch information
phw committed Sep 15, 2023
1 parent 6721fb3 commit 8830729
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions plugins/deezerart/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down Expand Up @@ -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))
Expand Down

0 comments on commit 8830729

Please sign in to comment.