fix artists

This commit is contained in:
Sayem Chowdhury 2021-04-13 14:05:27 +06:00
parent ee452e67c0
commit 65e38649d0

View File

@ -11,9 +11,9 @@ 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())
.join(', ');
const artists = track.ART_NAME.split(
new RegExp(' featuring | feat. | Ft. | ft. | vs | vs. | x | - |, ', 'g'),
).map((a) => a.trim());
writer
.setFrame('TIT2', track.SNG_TITLE)
@ -48,7 +48,7 @@ export const writeMetadataMp3 = (
.setFrame('TMED', 'Digital Media')
.setFrame('TXXX', {
description: 'Artists',
value: artists,
value: artists.join(', '),
})
.setFrame('TXXX', {
description: 'ISRC',