Parse additional ID3v2 and Vorbis metadata fields

- Parse Comment (COMM), Composer (TCOM), and Encoded By (TENC)
  from ID3v2 tags
- Parse COMMENT, COMPOSER, URL, and ENCODEDBY/ENCODER
  from Vorbis comments (FLAC)
This commit is contained in:
Armin 2026-07-08 04:12:02 +02:00
commit c18eaac989

View file

@ -750,6 +750,9 @@ async function readId3v2(file) {
else if (frameId === 'TCON') tags.genre = parseGenre(text);
else if (frameId === 'TYER' || frameId === 'TDRC') tags.year = text;
else if (frameId === 'TRCK') tags.track = text;
else if (frameId === 'COMM') tags.comment = text;
else if (frameId === 'TCOM') tags.composer = text;
else if (frameId === 'TENC') tags.encodedBy = text;
pos += frameSize + 10;
}
return tags;
@ -820,6 +823,11 @@ async function readVorbisComments(file) {
case 'DATE':
case 'YEAR': tags.year = value; break;
case 'TRACKNUMBER': tags.track = value; break;
case 'COMMENT': tags.comment = value; break;
case 'COMPOSER': tags.composer = value; break;
case 'URL': tags.urlTag = value; break;
case 'ENCODEDBY':
case 'ENCODER': tags.encodedBy = value; break;
}
}
return Object.keys(tags).length > 0 ? tags : null;