From c74389d330ffa2c802051546e1ea30d6a1c1fcdb Mon Sep 17 00:00:00 2001 From: Daniel <790119+DanTheMan827@users.noreply.github.com> Date: Fri, 20 Mar 2026 19:44:21 -0500 Subject: [PATCH] fix(metadata): write xid to mp4 files --- js/taglib.worker.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/js/taglib.worker.ts b/js/taglib.worker.ts index 5f0465f..87482b9 100644 --- a/js/taglib.worker.ts +++ b/js/taglib.worker.ts @@ -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) {