Add series metadata tagging and tests

Include series and seriesPart metadata when tagging audio files. For m4b output the code uses show and episode_id; for mp3 and flac it writes SERIES and SERIES-PART. Adds unit tests verifying tag output for .m4b, .mp3, and .flac and that tags are omitted when fields are absent.
This commit is contained in:
kikootwo
2026-05-15 06:42:17 -04:00
parent f4fe6f936f
commit 071c788ead
2 changed files with 74 additions and 0 deletions
+8
View File
@@ -118,6 +118,14 @@ export async function tagAudioFileMetadata(
args.push('-metadata', `ASIN="${escapeMetadata(metadata.asin)}"`);
}
if (metadata.series) {
args.push('-metadata', `SERIES="${escapeMetadata(metadata.series)}"`);
}
if (metadata.seriesPart) {
args.push('-metadata', `SERIES-PART="${escapeMetadata(metadata.seriesPart)}"`);
}
// Explicitly specify output format
args.push('-f', 'flac');
}