mirror of
https://github.com/d-fi/d-fi-core.git
synced 2025-07-27 07:34:42 +02:00
fix tpe1
This commit is contained in:
parent
b8d1940bd8
commit
f1b1914dfc
@ -11,14 +11,14 @@ export const writeMetadataMp3 = (
|
||||
const writer = new id3Writer(buffer);
|
||||
const RELEASE_YEAR = album ? album.release_date.split('-')[0] : null;
|
||||
|
||||
const artists = track.ART_NAME.split(
|
||||
new RegExp(' featuring | feat. | Ft. | ft. | vs | vs. | x | - |, ', 'g'),
|
||||
).map((a) => a.trim());
|
||||
const artists = track.ART_NAME.split(new RegExp(' featuring | feat. | Ft. | ft. | vs | vs. | x | - |, ', 'g'))
|
||||
.map((a) => a.trim())
|
||||
.join(', ');
|
||||
|
||||
writer
|
||||
.setFrame('TIT2', track.SNG_TITLE)
|
||||
.setFrame('TALB', track.ALB_TITLE)
|
||||
.setFrame('TPE1', artists)
|
||||
.setFrame('TPE1', [artists])
|
||||
.setFrame('TLEN', Number(track.DURATION) * 1000);
|
||||
|
||||
if (album) {
|
||||
@ -54,7 +54,7 @@ export const writeMetadataMp3 = (
|
||||
.setFrame('TMED', 'Digital Media')
|
||||
.setFrame('TXXX', {
|
||||
description: 'Artists',
|
||||
value: artists.join(', '),
|
||||
value: artists,
|
||||
})
|
||||
.setFrame('TXXX', {
|
||||
description: 'ISRC',
|
||||
|
Loading…
x
Reference in New Issue
Block a user