mirror of
https://github.com/beetbox/beets.git
synced 2026-02-10 09:25:42 +01:00
Discogs <-> fetchart integration
This commit is contained in:
parent
e10b955a93
commit
c31146e3f5
2 changed files with 6 additions and 3 deletions
|
|
@ -399,7 +399,7 @@ class DiscogsPlugin(BeetsPlugin):
|
|||
|
||||
# Extract information for the optional AlbumInfo fields that are
|
||||
# contained on nested discogs fields.
|
||||
albumtype = media = label = catalogno = labelid = None
|
||||
albumtype = media = label = catalogno = labelid = cover_art_url = None
|
||||
if result.data.get('formats'):
|
||||
albumtype = ', '.join(
|
||||
result.data['formats'][0].get('descriptions', [])) or None
|
||||
|
|
@ -408,6 +408,8 @@ class DiscogsPlugin(BeetsPlugin):
|
|||
label = result.data['labels'][0].get('name')
|
||||
catalogno = result.data['labels'][0].get('catno')
|
||||
labelid = result.data['labels'][0].get('id')
|
||||
if result.data.get('cover_image'):
|
||||
cover_art_url = result.data.get('cover_image')
|
||||
|
||||
# Additional cleanups (various artists name, catalog number, media).
|
||||
if va:
|
||||
|
|
@ -444,7 +446,8 @@ class DiscogsPlugin(BeetsPlugin):
|
|||
media=media, original_year=original_year,
|
||||
data_source='Discogs', data_url=data_url,
|
||||
discogs_albumid=discogs_albumid,
|
||||
discogs_labelid=labelid, discogs_artistid=artist_id)
|
||||
discogs_labelid=labelid, discogs_artistid=artist_id,
|
||||
cover_art_url=cover_art_url)
|
||||
|
||||
def format(self, classification):
|
||||
if classification:
|
||||
|
|
|
|||
|
|
@ -992,7 +992,7 @@ class CoverArtUrl(RemoteArtSource):
|
|||
image_url = None
|
||||
try:
|
||||
# look for cover_art_url on album or first track
|
||||
if album.cover_art_url:
|
||||
if album.get('cover_art_url', None):
|
||||
image_url = album.cover_art_url
|
||||
else:
|
||||
image_url = album.items().get().cover_art_url
|
||||
|
|
|
|||
Loading…
Reference in a new issue