fix artists tag

This commit is contained in:
Sayem Chowdhury 2021-04-23 17:18:44 +06:00
parent 520a13ca70
commit 7ac2b8ab40
1 changed files with 4 additions and 8 deletions

View File

@ -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())
.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)
.setFrame('TALB', track.ALB_TITLE)
.setFrame('TPE1', [artists])
.setFrame('TPE1', artists)
.setFrame('TLEN', Number(track.DURATION) * 1000)
.setFrame('TSRC', track.ISRC);
@ -53,10 +53,6 @@ export const writeMetadataMp3 = (
writer
.setFrame('TMED', 'Digital Media')
.setFrame('TXXX', {
description: 'Artists',
value: artists,
})
.setFrame('TXXX', {
description: 'SOURCE',
value: 'Deezer',