Fix artist images: filter Last.fm placeholder, reorder providers#233
Open
safierinx-a wants to merge 1 commit intogabehf:mainfrom
Open
Fix artist images: filter Last.fm placeholder, reorder providers#233safierinx-a wants to merge 1 commit intogabehf:mainfrom
safierinx-a wants to merge 1 commit intogabehf:mainfrom
Conversation
… 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.
5 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 inselectBestImageto reject URLs containing this known placeholder hash. This is the same approach Navidrome uses.Bug 2 — Provider order (
internal/images/imagesrc.go)GetArtistImagechecked 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)FetchMissingArtistImageshad theif err != nil/elsebranches swapped — aliases were used on error, and the bare artist name was used on success. Fixed toerr == nil.Test plan
go build ./...compilesgo test ./...passes🤖 Generated with Claude Code