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