From 1f9495f8060cc34ed906ada792f6a1ad6541882b Mon Sep 17 00:00:00 2001 From: Honey Date: Mon, 8 Jun 2026 20:31:08 +0200 Subject: [PATCH] fix(android): persist artists array in localStorage so multi-artist splits survive cold start MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The queue serialization was saving artist as a plain string but not the artists array. On cold start the app restores from localStorage, so parseArtists had no array to work with and fell back to splitting the artist string by semicolons — "Maduk Veela" has none, so it returned one combined entry. PWA always re-fetches fresh API data so the array was always present. Adding artists:[] to both song and queue entries fixes artist navigation after cold start on Android. Co-Authored-By: Claude Sonnet 4.6 --- src/player/player.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/player/player.js b/src/player/player.js index 431e276..777d0b6 100644 --- a/src/player/player.js +++ b/src/player/player.js @@ -483,10 +483,12 @@ export function updatePlayerUI(s, _skipMediaSession = false) { try { localStorage.setItem('ns_last_played', JSON.stringify({ song: { id:s.id, title:s.title, artist:s.artist, album:s.album, albumId:s.albumId, - artistId:s.artistId, coverArt:s.coverArt, duration:s.duration, _starred:s._starred||false }, + artistId:s.artistId, coverArt:s.coverArt, duration:s.duration, _starred:s._starred||false, + artists:s.artists||[] }, queue: S.queue.map(t => ({ id:t.id, title:t.title, artist:t.artist, album:t.album, albumId:t.albumId, artistId:t.artistId, coverArt:t.coverArt, - duration:t.duration, _starred:t._starred||false })), + duration:t.duration, _starred:t._starred||false, + artists:t.artists||[] })), qIdx: S.qIdx, })); } catch {}