From 9f0cb899ed6ceed37639949270350ed5bad20e3f Mon Sep 17 00:00:00 2001 From: Honey Date: Mon, 27 Apr 2026 18:30:56 +0200 Subject: [PATCH] fix(spotify): use first artist for iTunes search in single-track downloads MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Multi-artist strings like "Kløn, Renzyx" from Spotify's subtitle field confuse the iTunes search API. Use only the first artist (split on comma) as the search term, same as the playlist path already does. Co-Authored-By: Claude Sonnet 4.6 --- backend/novasonic-server.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/backend/novasonic-server.js b/backend/novasonic-server.js index 419abf3..ce2baa4 100644 --- a/backend/novasonic-server.js +++ b/backend/novasonic-server.js @@ -584,8 +584,10 @@ app.post('/api/download', async (req, res) => { let meta = { album: spAlbum, year: spYear, trackNum: sp.trackNumber || undefined, artworkUrl: spArt, explicit: sp.trackExplicitness === 'explicit' || !!explicit }; if (!meta.album) { + // Use first artist only for iTunes search (multi-artist strings like "Kløn, Renzyx" confuse iTunes) + const searchArtist = artist.split(',')[0].trim(); log(jobId, '📋 Suche Album-Metadaten von iTunes…'); - const extra = await lookupItunesTrackMeta(artist, title); + const extra = await lookupItunesTrackMeta(searchArtist, title); if (extra.album) log(jobId, `📋 Album: "${extra.album}" (${extra.year || '?'})`); meta = { ...meta, ...extra, artworkUrl: spArt || extra.artworkUrl || '' }; } else {