fix(metadata): write xid to mp4 files

This commit is contained in:
Daniel 2026-03-20 19:44:21 -05:00 committed by GitHub
parent e22d2b96ad
commit c74389d330
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -122,6 +122,10 @@ export async function addMetadataToAudio(message: _AddMetadataMessage): Promise<
if (copyright) props.replace('COPYRIGHT', [copyright]);
if (isrc) props.replace('ISRC', [isrc]);
if (isrc && isMp4) {
const mp4Tag = (underlying as Mp4File).tag() as Mp4Tag;
mp4Tag.setItem('xid ', Mp4Item.fromStringList([`:isrc:${isrc}`]));
}
if (lyrics) props.replace('LYRICS', [lyrics.replace(/\r/g, '').replace(/\n/g, '\r\n')]);
if (explicit !== undefined) {