Merge pull request #371 from DanTheMan827/patch-2
fix(metadata): write xid to mp4 files
This commit is contained in:
commit
fc9132157e
1 changed files with 4 additions and 0 deletions
|
|
@ -122,6 +122,10 @@ export async function addMetadataToAudio(message: _AddMetadataMessage): Promise<
|
||||||
|
|
||||||
if (copyright) props.replace('COPYRIGHT', [copyright]);
|
if (copyright) props.replace('COPYRIGHT', [copyright]);
|
||||||
if (isrc) props.replace('ISRC', [isrc]);
|
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 (lyrics) props.replace('LYRICS', [lyrics.replace(/\r/g, '').replace(/\n/g, '\r\n')]);
|
||||||
|
|
||||||
if (explicit !== undefined) {
|
if (explicit !== undefined) {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue