mirror of
https://github.com/kikootwo/ReadMeABook.git
synced 2026-06-03 04:40:09 +00:00
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:
@@ -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');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user