From ce4577e8f4ca04e41219f92d136425ea64e4d5d2 Mon Sep 17 00:00:00 2001 From: Honey Date: Fri, 19 Jun 2026 10:44:13 +0200 Subject: [PATCH] fix(backend): strip release suffix from title metadata tag searchTitle (e.g. "recognize") is now passed to embedMetadata instead of the raw title ("recognize - Single"), so the ID3 title tag matches the actual song name. Album tag stays unchanged ("recognize - Single"). Co-Authored-By: Claude Sonnet 4.6 --- backend/lib/ytdlp.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/lib/ytdlp.js b/backend/lib/ytdlp.js index 9ff4e29..1924f0f 100644 --- a/backend/lib/ytdlp.js +++ b/backend/lib/ytdlp.js @@ -195,7 +195,7 @@ async function downloadTrack({ jobId, artist, rawArtist, albumArtist, title, alb await spawnYtdlp([sourceUrl, '--no-playlist', ...baseArgs]); const audioFile = hasAudio() ? expectedAudio : null; if (!audioFile) { log(jobId, '⚠️ Download fehlgeschlagen'); return { success: true, dir }; } - return embedMetadata({ jobId, audioFile, dir, trackPrefix, safeTitle, rawArtist, artist, mainArtist, album, year, trackNum, totalTracks, discNum, discTotal, compilation, genre, artworkUrl, explicit, title }); + return embedMetadata({ jobId, audioFile, dir, trackPrefix, safeTitle, rawArtist, artist, mainArtist, album, year, trackNum, totalTracks, discNum, discTotal, compilation, genre, artworkUrl, explicit, title: searchTitle }); } // Fetch YTM search result URLs as a flat list (no channel expansion) and return only @@ -346,7 +346,7 @@ async function downloadTrack({ jobId, artist, rawArtist, albumArtist, title, alb return { success: true, dir }; } - return embedMetadata({ jobId, audioFile, dir, trackPrefix, safeTitle, rawArtist, artist, mainArtist, album, year, trackNum, totalTracks, discNum, discTotal, compilation, genre, artworkUrl, explicit, title }); + return embedMetadata({ jobId, audioFile, dir, trackPrefix, safeTitle, rawArtist, artist, mainArtist, album, year, trackNum, totalTracks, discNum, discTotal, compilation, genre, artworkUrl, explicit, title: searchTitle }); } // Shared ffmpeg metadata embedding — used by both yt-dlp and squid paths