From 1e206e8df371b601449aaf4f8e84c4539341cf9a Mon Sep 17 00:00:00 2001 From: Honey Date: Sat, 1 Aug 2026 00:31:09 +0200 Subject: [PATCH] =?UTF-8?q?fix(web):=20'Unknown=20Artist'=20download=20fro?= =?UTF-8?q?m=20artist=20page=20+=20rename=20itunes*=E2=86=92deezer*=20iden?= =?UTF-8?q?tifiers?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fix (the reported bug): - Deezer's /artist/{id}/albums omits the artist object, so discography album cards had an empty artist name → the download modal fell back to the literal "Unknown Artist", which poisoned the yt-dlp search ("Unknown Artist ") and its artist/channel filter, failing with "Nicht eindeutig gefunden". - deezerLookupArtistAlbums now backfills the known artist name (we're on that artist's page). - openDlModal now defaults album cards to an ALBUM download (was always Track), so a one-click download no longer grabs an album as a single track named after the album. Rename (requested cleanup, dependency-checked so nothing breaks): - All frontend itunes* identifiers → deezer* (functions, the ItunesItem-shape field keys itunesData/itunesArtistId/itunesFanCount/itunesId, the itunes-album-detail route + DOM ids, the badge-itunes CSS class). The backend reads none of these fields, so the boundary is safe. - Verified: build passes; route/DOM-id/CSS producer↔consumer all consistent; only the factual "Apple's iTunes /search 403" comments keep the historical name. SW ns-v62. Co-Authored-By: Claude Opus 4.8 --- CHANGELOG.md | 3 +- index.html | 22 ++++++------ public/sw.js | 2 +- src/api.js | 34 ++++++++++-------- src/main.js | 4 +-- src/ui/components.js | 2 +- src/ui/downloads.js | 13 ++++--- src/views/detail.js | 80 ++++++++++++++++++++--------------------- src/views/discover.js | 18 +++++----- src/views/navigation.js | 4 +-- src/views/search.js | 34 +++++++++--------- src/views/spotify.js | 8 ++--- styles.css | 2 +- 13 files changed, 118 insertions(+), 108 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ec6d69d..51d52ce 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -72,6 +72,7 @@ Big change: **the entire metadata/search stack moved from Apple's iTunes to Deez - The autofill endpoint moved `/api/itunes/lookup` → **`/api/meta/lookup`** - **Web + Android** — All user-visible "iTunes" / "Apple Music" labels are now "Deezer" (search badge, charts badge, preview bar, editor autofill button, artist "populär" heading) - **Backend** — Removed the dead iTunes `/search` proxy and the Apple charts RSS proxy; the Deezer proxy (`/api/deezer/*`) now also serves charts and the editor lookup +- **Web** — Renamed the leftover `itunes*` frontend identifiers to `deezer*` (`itunesSearch` → `deezerSearch`, `itunesLookup*` → `deezerLookup*`, `itunesData`/`itunesArtistId` → `deezerData`/`deezerArtistId`, the `itunes-album-detail` route/DOM ids, the `badge-itunes` CSS class, …). Purely internal — no behaviour change; only the factual "Apple's iTunes /search 403" comments keep the old name ### Added - **Web + Android** — **Same-name artist disambiguation**: Deezer's artist search isn't ranked by popularity, so a name collision (5 artists named "Joji") returned a niche one first — the artist page then loaded the wrong discography and owned songs didn't show as downloaded. Artists are now sorted by Deezer fan count, and on a local artist page (web) with a real collision the pick is tie-broken by **song overlap** with your library (each artist has different songs). The **fan count is shown** on search artist cards and on both the Deezer *and* local Navidrome artist pages (web + Android) @@ -79,6 +80,7 @@ Big change: **the entire metadata/search stack moved from Apple's iTunes to Deez - **Backend** — Unit tests for the Deezer mapping/matching logic (`backend/test/deezer.test.js`, run with `npm test`), incl. per-track numbering, mixed-artist album-artist stability, explicit flags and the Japanese-title match guard. A live smoke test runs with `RUN_LIVE=1` ### Fixed +- **Web** — Downloading a not-yet-owned album from an artist page searched YouTube for "**Unknown Artist** <album>" and failed. Deezer's `/artist/{id}/albums` omits the `artist` object, so the discography cards had an empty artist name → the modal fell back to the literal `"Unknown Artist"`. Fixed by backfilling the known artist name in `deezerLookupArtistAlbums` and defaulting the download modal to **Album** for album cards (was always **Track**) - **Web + Android** — Owned albums were wrongly shown as **"Unvollständig 1 / 0 Tracks"** on the artist page. Deezer's `/artist/{id}/albums` list omits `nb_tracks`, so the total read as 0 and every matched album looked incomplete. Web now resolves the real track count from the Deezer album endpoint for **matched (owned) albums only** and treats an unknown total as complete; Android treats an unknown total as complete (never a false partial) ### Notes @@ -415,7 +417,6 @@ Primary causes identified: - **Web + Android** — yt-dlp backend update / maintenance ### Known Bugs -- **Web (download)** — Downloading a not-yet-owned album **straight from an artist page** can fail with "Nicht eindeutig gefunden" and search YouTube for "**Unknown Artist** <album>". Three causes combine: (1) Deezer's `/artist/{id}/albums` omits the `artist` object, so the discography cards carry an **empty artist name** (`_dzAlbum` → `artistName: ''`); (2) `openDlModal` defaults to **type=track** even for album cards (the `isAlbum` flag is ignored), so a one-click download treats the album as a single track named after the album; (3) `downloads.js` substitutes the literal string `"Unknown Artist"` for the empty name, which then poisons the yt-dlp search query **and** the `artist ~= Unknown` / `channel ~= Unknown` filter. Workaround: switch the type to *Album* in the modal, or use the direct-link importer. Not yet fixed. - **Android (lyrics)** — Synced-lyrics auto-scroll is **not smooth**: it follows playback and highlights the right line, but the list jumps to it rather than gliding. Web autoscroll is smooth. Not yet fixed. - **Web (PWA, desktop)** — The Windows media tile (SMTC) briefly closes and reopens when skipping tracks. Swapping the `