fix: correct year and date for "Heimweh" by Freddy Quinn and clarify metadata handling in track processing
All checks were successful
Build and Push Docker Image / docker (push) Successful in 5s

This commit is contained in:
2025-10-12 23:30:45 +02:00
parent 6001143bbf
commit 60988c224d
3 changed files with 8 additions and 6 deletions

View File

@@ -37,13 +37,14 @@ export async function listTracks(playlistId = 'default') {
let title = jsonMeta?.title ?? path.parse(f).name;
let artist = jsonMeta?.artist ?? '';
// Only parse audio file if JSON doesn't have complete metadata
// Only parse audio file if JSON doesn't have title or artist metadata
// Note: year is ONLY taken from years.json, never from audio file
if (!jsonMeta || !jsonMeta.title || !jsonMeta.artist) {
try {
const meta = await mmParseFile(fp, { duration: false });
title = jsonMeta?.title || meta.common.title || title;
artist = jsonMeta?.artist || meta.common.artist || artist;
year = jsonMeta?.year ?? meta.common.year ?? year;
// year remains from years.json only - do not use meta.common.year
} catch {}
}