mirror of
https://codeberg.org/armin/noiz.git
synced 2026-09-01 14:00:54 +02:00
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:
parent
1a933585d2
commit
c18eaac989
1 changed files with 8 additions and 0 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue