feat: disambiguate same-name artists by Deezer fan count + show fans
Deezer's artist search doesn't rank by popularity, so a name collision (5 artists named "Joji") returned a niche one first (62 fans) instead of the real Joji (559k) — the artist page then loaded the wrong discography and owned songs didn't show as downloaded. - api.js: _dzArtist carries fanCount (nb_fan); artist search sorts by fanCount desc. - search.js: artist cards show the fan count as subtitle; fan count passed to the artist page. - detail.js: pick the most-popular name match (not the first); for local Navidrome artists with a real collision (>=2 same-name candidates), tie-break by SONG OVERLAP — prefer the Deezer candidate whose top tracks actually overlap the library (each artist has different songs, so this nails the right person). Costs a few calls only on a collision. - Artist hero shows "<n> Fans" (immediately for global-search artists, after match for local). - Android: DzArtist.nb_fan + /search/artist sorted by nb_fan so the right artist is first. - Also: web global-search "unavailable" message now says Deezer, not Apple. SW ns-v52. Verified live against Deezer: both fan-sort and overlap select the real Joji (id 5078097). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
1 parent
1e69831dd8
commit
065d2f7319
9 files changed
+69
-19
No files matched your search
+1
-1
@@ -151,7 +151,7 @@
|
||||
<!-- ARTIST DETAIL -->
|
||||
<div class="page" id="page-artist-detail">
|
||||
<button class="back-btn" id="artist-back-btn"><svg width="13" height="13" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><polyline points="15 18 9 12 15 6"/></svg>Alle Künstler</button>
|
||||
<div class="artist-hero" id="artist-detail-hero"><div class="artist-hero-bg" id="artist-hero-bg"></div><div class="artist-hero-overlay"><div class="artist-hero-pfp-wrap" id="artist-hero-pfp-wrap"><span class="artist-hero-pfp-initial" id="artist-hero-pfp-initial"></span></div><div class="artist-hero-info"><div class="artist-hero-name" id="artist-detail-name"></div></div></div></div>
|
||||
<div class="artist-hero" id="artist-detail-hero"><div class="artist-hero-bg" id="artist-hero-bg"></div><div class="artist-hero-overlay"><div class="artist-hero-pfp-wrap" id="artist-hero-pfp-wrap"><span class="artist-hero-pfp-initial" id="artist-hero-pfp-initial"></span></div><div class="artist-hero-info"><div class="artist-hero-name" id="artist-detail-name"></div><div class="artist-hero-fans" id="artist-detail-fans"></div></div></div></div>
|
||||
<div id="artist-action-bar" class="artist-action-bar"></div>
|
||||
<div id="artist-bio-section"></div>
|
||||
<div id="artist-similar-section"></div>
|
||||
|
||||
Reference in new issue
Block a user