forked from Keelrleek/SoulStream
catalog: what the artist page can know once it asks somebody other than Deezer
One supplemental fetch behind the artist page -- the linked MBID, then Last.fm
and MusicBrainz in parallel -- and four separate things Deezer had been getting
wrong stop being wrong. They ship together because they are the same fetch:
`ArtistSupplements` carries scrobble counts and first-release dates out of one
`tokio::join!`, `ReleaseFacts` serves dates, disambiguation and attribution
alike, and `TrackStats` is read by both the Popular ordering and the album
expander. Splitting them would mean inventing intermediate states that never
ran.
**Popular is ordered by scrobbles, not by recency.** Deezer's `/top` is
recency-weighted, so a week-old single outranks the songs an artist is actually
known for -- Taylor Swift's Deezer top three are all from the current release
where Last.fm's are Blank Space, Cruel Summer, Shake It Off. Measured across 18
artists, Last.fm's canonical top ten is only 43% present in Deezer's top 10 but
77% by its top 50, and the curve flattens after that (79% at 100), so the pool
is 50 and the ten that survive are reordered rather than replaced. Nothing is
ever admitted that Deezer did not supply: Last.fm ranks rows, it does not add
them, so a track with no stream stays off the page.
**Albums are dated by their first release, not their latest pressing.** Deezer
dates a row from whatever pressing it licensed, so remasters scatter a
discography across decades. MusicBrainz release groups supply the real date over
three 100-item pages, which covers a very prolific catalogue (Queen has ~100
album groups alone) without walking a discography forever behind the mandatory
1 req/s gate.
**MusicBrainz separates seven self-titled Weezer albums by `disambiguation`,
and ignoring that field collapsed all of them.** Every one is titled plain
"Weezer"; only the disambiguator ("Blue Album" … "Gold Album") tells them apart.
Keyed on title alone, all seven folded onto one entry and kept the earliest
date, which is how the 2026 Gold Album came out dated 1994-05-10 and filed as an
edition of the Red Album. Groups are now indexed under their disambiguated name
as well, which is an exact match rather than a fuzzy one because Deezer prints
the same disambiguator in its own parenthetical. Three things fall out of that:
a key that collapses groups with DIFFERENT dates is marked `ambiguous` and dates
nothing (equal dates are a reissue duplicate and still fine); "Weezer (Deluxe
Edition / Red Album)" keeps the colour instead of losing the whole bracket; and
a pressing takes its work's date through the tracklist-verified `edition_group`,
which knows what titles cannot. Verified: Gold → 2026-08-21 in Upcoming and
standalone, Red → 2008 with its three editions, Green → 2001-05-07, every deluxe
sitting with its own record.
**A popular track is shown on the album it came from, not the one Deezer
licensed.** This is the big one. Bohemian Rhapsody came back attributed to the
2018 film soundtrack, wearing that poster as its cover, and 10 of Queen's top 10
were wrong the same way. The rule takes the earliest album-typed release that
actually contains the song, and swaps `album`, `album_id`, `cover`, `id`,
`preview` and `duration_secs` together with a new `origin_track_id`. Live:
Queen 0/10 → 10/10, Fleetwood Mac 10/10, Radiohead 10/10, Green Day 9/10 -- the
documented Kerplunk! re-recording being the only miss. It costs 0 ms, because
the album details it reads are already fetched for the discography.
Three things that look like details and are not:
- The MusicBrainz secondary-type exclusion is load-bearing: 79/80 with it,
63/80 without. Compilations are dated EARLIER than the works they compile, so
"earliest wins" on its own actively SELECTS hits packages.
- "Already correct" has to be an OUTPUT test, not a candidate filter. Removing
the track's current album from the ranking means a correct row can only be
handed to the runner-up, which moved Dreams off plain Rumours onto Rumours
(Super Deluxe). 57 of the 80 measured tracks are in that already-correct
state, so this is the common case, not the edge one.
- A lead single always predates its own album, and EPs are admitted as
candidates, so Creep moved off Pablo Honey onto a "Creep EP" five months
earlier. Album now outranks EP above the date tiebreak -- it cannot affect a
row whose winner is already an album, and an EP still wins when no album
carries the song. Radiohead 9/10 → 10/10.
The details cap becomes two-sided for this: take 60, then top up to 80 with the
OLDEST album-typed rows. A bare 60 silently dropped Bob Dylan's canon --
Highway 61, Freewheelin', Blonde on Blonde -- which is exactly the material the
rule exists to find.
Known residual, seen in the wild: Blowin' in the Wind lands on The Witmark
Demos. MusicBrainz DOES type it Compilation, but calls it "The Bootleg Series,
Vol. 9: The Witmark Demos: 1962–1964" where Deezer calls it "The Witmark Demos:
1962-1964 (The Bootleg Series Vol. 9)". Different word order, different
title-join key, so the exclusion cannot see it. Not worth a title heuristic.
**Per-track play counts, for zero extra requests.** `artist.getTopTracks` was
already being fetched for the ordering above and carries `playcount` beside
`listeners`. The depth goes 100 → 1000, which is the same one request: at 100 it
reached 2 of Van Weezer's 10 tracks, at 1000 it covered 56 of 57 album tracks
measured across Johnny Cash, the Grateful Dead, Miles Davis, Dylan and Queen.
That works because the long tail is bootlegs and mislabelled scrobbles -- a real
album track is by definition one of the popular ones. Cost is body size, 77 KB →
~775 KB, disk cached for a day.
Album totals need a guard the track counts do not. Last.fm's album `playcount`
counts scrobbles tagged to that release page while track counts span every
release, so Weezer's Blue deluxe reported 89k album plays above a first track
showing 7.2M. A provider total that cannot cover its own biggest track is
rejected as an edition artifact and the tracklist is summed instead.
This commit is contained in:
1 parent
6d6968e9b1
commit
c0fa892eee
1 file changed
+2270
-59
+2270
-59
File diff suppressed because it is too large.
Load diff
Reference in new issue
Block a user