Skip Discogs query on insufficiently tagged files

- When files are missing both, album and artist tags, the Discogs metadata
  plugin sends empty information to the Discogs API which returns arbitrary
  query results.
- This patch catches this case and states it in beets import verbose output.
This commit is contained in:
J0J0 T 2022-01-09 14:29:47 +01:00 committed by J0J0 T
parent 2fea53c34d
commit e35c767e2c

View file

@ -157,6 +157,11 @@ class DiscogsPlugin(BeetsPlugin):
if not self.discogs_client:
return
if not album and not artist:
self._log.debug('Skipping Discogs query. Files missing album and '
'artist tags.')
return []
if va_likely:
query = album
else: