Skip to content

Commit

Permalink
fix discogs without cover image
Browse files Browse the repository at this point in the history
  • Loading branch information
alphatownsman committed Nov 2, 2023
1 parent 320e073 commit 8cca52c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions catalog/sites/discogs.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def scrape(self):
)

media, disc_count = None, None
formats = release.get("formats")
formats = release.get("formats", [])
if len(formats) == 1:
media = formats[0].get("name")
disc_count = formats[0].get("qty")
Expand All @@ -57,7 +57,7 @@ def scrape(self):
i["value"].replace(" ", "").replace("-", "")
)
image_url = None
if len(release.get("images")) > 0:
if len(release.get("images", [])) > 0:
image_url = release["images"][0].get("uri")
pd = ResourceContent(
metadata={
Expand Down

0 comments on commit 8cca52c

Please sign in to comment.