Skip to content

Discogs cover art fails to load in candidate preview (404 on /api_v1/art?url=...) despite successful fetchart after import #274

@lesley-vladislav

Description

@lesley-vladislav

Description

Cover art does not load in the candidate preview window (the modal that opens after selecting a release candidate in the Inbox autotag/lookup flow).
The request to /api_v1/art?url=... always returns 404 Not Found, and a placeholder/spinner appears instead.

However:

  • After confirming the import, fetchart works perfectly — the cover is downloaded, embedded (embedart), and visible in the library.
  • Local covers (cover.jpg, folder.jpg etc. in the album folder) are displayed correctly even in preview.

This happens with all external sources I've tested (Discogs, Beatport, Bandcamp), regardless of the release.

Environment

  • beets-flask version: 2.0.0-rc2 (also reproduced on stable / 1.2.x)
  • Docker image: pspitzner/beets-flask:v2.0.0-rc2
  • Host OS: Windows 11
  • Docker Desktop: latest (with WSL 2 backend)
  • beets version inside container: 2.5.1
  • Browser: Chrome 131 / Firefox 133 (same behavior in both, incognito mode too)

Reproduction steps

Place a folder with audio files (no local cover.jpg) into the inbox (/music_path/inbox)
Go to Inbox → select the album → click Autotag / Lookup
Select any candidate (Discogs, Beatport, Bandcamp, MusicBrainz — all the same)
Open the preview modal for the candidate
See spinner → after a few seconds → placeholder (no cover art)

Browser Network tab (F12 → Network)
Every time the same:

Request: GET http://localhost:5001/api_v1/art?url=https%3A%2F%2Fwww.discogs.com%2Frelease%2F...
Status: 404 Not Found
Response: empty or minimal JSON error (usually just 404 page)
Similar for Beatport/Bandcamp URLs

Example URLs that fail:

http://localhost:5001/api_v1/art?url=https%3A%2F%2Fwww.discogs.com%2Frelease%2F1284440-Paul-Hertzog-Bloodsport-Original-Motion-Picture-Score
http://localhost:5001/api_v1/art?url=https%3A%2F%2Fbeatport.com%2Frelease%2Fmake-it-out-alive-original-mix%2F4524459

Additional observations

If I place a cover.jpg in the incoming album folder → it loads instantly in preview (filesystem source works).
CLI import works perfectly: beet import /music_path/inbox --timid → candidates found, covers downloaded & embedded.
No errors in container logs (docker logs beets-flask) during preview attempt.
Tried:
cautious: no / yes
enforce_ratio: null
minwidth: 0
different browsers
http://127.0.0.1:5001/ instead of localhost
cleared browser cache
restarted container multiple times

Still 404 in preview.
Expected behavior
I would expect the same cover art that gets fetched successfully after import to appear (at least sometimes) in the preview modal, like shown in the demo video on the README.
Possible cause (my guess)
Preview mode runs fetchart in a "dry-run" / simulation context without full item metadata or write permissions, so it fails to download/proxy external covers → 404.
Post-import full context allows successful fetch.
Thank you for this great project!
Happy to provide more logs, config, screenshots, or test any suggested changes.

Configuration (relevant parts from /config/beets/config.yaml)

fetchart:
  auto: yes
  cautious: no                # tried both yes and no — no difference in preview
  minwidth: 0                 # tried 0, 300, 500
  maxwidth: null              # tried 1000, 1200, null
  enforce_ratio: null         # tried null, "10%", "5%"
  cover_format: jpeg
  store_source: yes
  sources:
    - filesystem
    - bandcamp
    - itunes
    - coverart: release
    - coverart: releasegroup
    - discogs

plugins:
  - fetchart
  - embedart
  - ... (discogs, beatport4, bandcamp, etc. are loaded and work in CLI import)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions