mirror of
https://github.com/beetbox/beets.git
synced 2025-12-27 19:12:40 +01:00
PR feedback: fix formatting
This commit is contained in:
parent
3e06ca2af4
commit
5fe19c1d1d
2 changed files with 6 additions and 6 deletions
|
|
@ -476,17 +476,17 @@ class DiscogsPlugin(BeetsPlugin):
|
|||
discogs_albumid=discogs_albumid,
|
||||
discogs_labelid=labelid,
|
||||
discogs_artistid=artist_id,
|
||||
cover_art_url=cover_art_url
|
||||
cover_art_url=cover_art_url,
|
||||
)
|
||||
|
||||
|
||||
def select_cover_art(self, result):
|
||||
"""Returns the best candidate image, if any, from a Discogs `Release` object."""
|
||||
if result.data.get("images") and len(result.data.get("images")) > 0:
|
||||
# The first image in this list appears to be the one displayed first
|
||||
# on the release page - even if it is not flagged as `type: "primary"` - and
|
||||
# The first image in this list appears to be the one displayed first
|
||||
# on the release page - even if it is not flagged as `type: "primary"` - and
|
||||
# so it is the best candidate for the cover art.
|
||||
return result.data.get("images")[0].get("uri")
|
||||
|
||||
|
||||
return None
|
||||
|
||||
def format(self, classification):
|
||||
|
|
|
|||
|
|
@ -1098,7 +1098,7 @@ class CoverArtUrl(RemoteArtSource):
|
|||
image_url = None
|
||||
try:
|
||||
# look for cover_art_url on album or first track
|
||||
if album.get('cover_art_url'):
|
||||
if album.get("cover_art_url"):
|
||||
image_url = album.cover_art_url
|
||||
else:
|
||||
image_url = album.items().get().cover_art_url
|
||||
|
|
|
|||
Loading…
Reference in a new issue