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
All checks were successful
Build and Push Docker Image / docker (push) Successful in 5s
This commit is contained in:
@@ -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 {}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user