improve COMPILATION

This commit is contained in:
Sayem Chowdhury 2021-04-13 14:23:32 +06:00
parent 65e38649d0
commit 84c6a04c0f
2 changed files with 5 additions and 4 deletions

View File

@ -29,6 +29,7 @@ export const writeMetadataFlac = (
flac.setTag('LABEL=' + album.label);
flac.setTag('DATE=' + album.release_date);
flac.setTag('YEAR=' + RELEASE_YEAR);
flac.setTag('COMPILATION=' + album.artist.name.match(/various/i) ? '1' : '0');
}
if (track.DISK_NUMBER) {

View File

@ -41,6 +41,10 @@ export const writeMetadataMp3 = (
.setFrame('TXXX', {
description: 'LABEL',
value: album.label,
})
.setFrame('TXXX', {
description: 'COMPILATION',
value: album.artist.name.match(/various/i) ? '1' : '0',
});
}
@ -54,10 +58,6 @@ export const writeMetadataMp3 = (
description: 'ISRC',
value: track.ISRC,
})
.setFrame('TXXX', {
description: 'COMPILATION',
value: track.ART_PICTURE === 'Various Artists' ? '1' : '0',
})
.setFrame('TXXX', {
description: 'SOURCE',
value: 'Deezer',