feat(artist pin): pin by Deezer link/ID when search can't surface the artist

Deezer's /search/artist is a ranked, incomplete fuzzy match — low-profile
same-name artists (e.g. Nana id 80239872) never appear in results. Add a
"paste Deezer link or ID" field to the pin picker that looks the artist up
directly via /artist/{id} (new deezerLookupArtist) and pins it. Same reliable
route as the importer direct link vs yt-dlp search.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
HoneyandClaude Opus 4.8 committed 2026-08-13 00:38:33 +02:00
1 parent 5f251d555f
commit ba2306656e
3 files changed
+62 -6

No files matched your search

+14
View File
@@ -425,6 +425,20 @@ export async function deezerLookupArtistAlbums(artistId, limit=100, artistName='
} catch { return []; }
}
// Direct artist lookup by Deezer id — the reliable route when /search/artist doesn't surface a
// low-profile same-name artist (Deezer search is a ranked, incomplete fuzzy match; e.g. the browser
// finds Nana id 80239872 but the search API never returns it). Used by the artist-pin "paste link"
// path. Returns the full _dzArtist shape (or null on miss / bad id).
export async function deezerLookupArtist(artistId) {
try {
const r = await fetch(`${_deezerBase()}/artist/${artistId}`);
if (!r.ok) return null;
const a = await r.json();
if (!a || a.error || !a.id) return null;
return _dzArtist(a);
} catch { return null; }
}
// Deezer artist photo (for the hero on non-local artist pages). iTunes artist entities had none.
export async function deezerArtistImage(artistId) {
try {