mirror of
https://github.com/d-fi/d-fi-core.git
synced 2025-07-27 07:34:42 +02:00
fix tagging
This commit is contained in:
parent
9e139d54a0
commit
e468369727
@ -44,8 +44,10 @@ export const writeMetadataFlac = (
|
||||
flac.setTag('EXPLICIT=' + track.EXPLICIT_LYRICS);
|
||||
}
|
||||
|
||||
if (track.SNG_CONTRIBUTORS) {
|
||||
if (track.SNG_CONTRIBUTORS && !Array.isArray(track.SNG_CONTRIBUTORS)) {
|
||||
if (track.SNG_CONTRIBUTORS.main_artist) {
|
||||
flac.setTag(`COPYRIGHT=${RELEASE_YEAR} ${track.SNG_CONTRIBUTORS.main_artist[0]}`);
|
||||
}
|
||||
if (track.SNG_CONTRIBUTORS.publisher) {
|
||||
flac.setTag('ORGANIZATION=' + track.SNG_CONTRIBUTORS.publisher.join(', '));
|
||||
}
|
||||
|
@ -65,8 +65,10 @@ export const writeMetadataMp3 = (
|
||||
writer.setFrame('TPOS', track.DISK_NUMBER).setFrame('TRCK', track.TRACK_NUMBER + '/' + album.nb_tracks);
|
||||
}
|
||||
|
||||
if (track.SNG_CONTRIBUTORS) {
|
||||
if (track.SNG_CONTRIBUTORS && !Array.isArray(track.SNG_CONTRIBUTORS)) {
|
||||
if (track.SNG_CONTRIBUTORS.main_artist) {
|
||||
writer.setFrame('TCOP', `${RELEASE_YEAR} ${track.SNG_CONTRIBUTORS.main_artist[0]}`);
|
||||
}
|
||||
if (track.SNG_CONTRIBUTORS.publisher) {
|
||||
writer.setFrame('TPUB', track.SNG_CONTRIBUTORS.publisher.join(', '));
|
||||
}
|
||||
|
@ -44,7 +44,8 @@ interface songType {
|
||||
SMARTRADIO: string; // 0
|
||||
SNG_ID: string; // '3135556'
|
||||
SNG_TITLE: string; // 'Harder, Better, Faster, Stronger'
|
||||
SNG_CONTRIBUTORS?: {
|
||||
SNG_CONTRIBUTORS?:
|
||||
| {
|
||||
main_artist: string[]; //['Daft Punk']
|
||||
author?: string[]; // ['Edwin Birdsong', 'Guy-Manuel de Homem-Christo', 'Thomas Bangalter']
|
||||
composer?: string[];
|
||||
@ -54,7 +55,8 @@ interface songType {
|
||||
engineer?: string[];
|
||||
writer?: string[];
|
||||
mixer?: string[];
|
||||
};
|
||||
}
|
||||
| [];
|
||||
STATUS: number; // 3
|
||||
S_MOD: number; // 0
|
||||
S_PREMIUM: number; // 0
|
||||
|
Loading…
x
Reference in New Issue
Block a user