Skip to content

Fix artist images: filter Last.fm placeholder, reorder providers#233

Open
safierinx-a wants to merge 1 commit intogabehf:mainfrom
safierinx-a:fix/artist-images
Open

Fix artist images: filter Last.fm placeholder, reorder providers#233
safierinx-a wants to merge 1 commit intogabehf:mainfrom
safierinx-a:fix/artist-images

Conversation

@safierinx-a
Copy link
Copy Markdown

@safierinx-a safierinx-a commented Mar 26, 2026

Summary

Fixes three bugs causing all artist images to display as the same Last.fm generic placeholder.

Bug 1 — Last.fm placeholder not filtered (internal/images/lastfm.go)
Last.fm removed real artist images from their API in May 2019, citing ToS Section 5.1.8. Every artist query now returns the same placeholder (hash 2a96cbd8b46e442fc41c2b86b821562f). Added a filter in selectBestImage to reject URLs containing this known placeholder hash. This is the same approach Navidrome uses.

Bug 2 — Provider order (internal/images/imagesrc.go)
GetArtistImage checked Last.fm before Deezer. Since Last.fm "succeeded" with the placeholder URL, Deezer was never reached. Swapped order so Deezer (which returns real artist photos) is tried first.

Bug 3 — Inverted if/else in backfill (internal/catalog/images.go)
FetchMissingArtistImages had the if err != nil / else branches swapped — aliases were used on error, and the bare artist name was used on success. Fixed to err == nil.

Test plan

  • go build ./... compiles
  • go test ./... passes
  • Manual: clear stale placeholder images, restart, verify real Deezer artist images appear
  • Verify album images still work (no change to album provider order)

🤖 Generated with Claude Code

… alias bug

Three bugs causing all artist images to be the same Last.fm placeholder:

1. Last.fm stopped serving real artist images years ago and returns a
   generic placeholder (hash 2a96cbd8b46e442fc41c2b86b821562f) for
   every artist. Added filter in selectBestImage to reject URLs
   containing this known placeholder hash.

2. Provider order had Last.fm before Deezer for artist images. Since
   Last.fm "succeeded" with the placeholder, Deezer was never reached.
   Swapped order: Deezer now checked before Last.fm.

3. FetchMissingArtistImages had inverted if/else — aliases were used
   on error, bare name on success. Fixed condition to err == nil.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant