mirror of
https://github.com/d-fi/d-fi-core.git
synced 2025-07-27 15:44:26 +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);
|
flac.setTag('EXPLICIT=' + track.EXPLICIT_LYRICS);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (track.SNG_CONTRIBUTORS) {
|
if (track.SNG_CONTRIBUTORS && !Array.isArray(track.SNG_CONTRIBUTORS)) {
|
||||||
flac.setTag(`COPYRIGHT=${RELEASE_YEAR} ${track.SNG_CONTRIBUTORS.main_artist[0]}`);
|
if (track.SNG_CONTRIBUTORS.main_artist) {
|
||||||
|
flac.setTag(`COPYRIGHT=${RELEASE_YEAR} ${track.SNG_CONTRIBUTORS.main_artist[0]}`);
|
||||||
|
}
|
||||||
if (track.SNG_CONTRIBUTORS.publisher) {
|
if (track.SNG_CONTRIBUTORS.publisher) {
|
||||||
flac.setTag('ORGANIZATION=' + track.SNG_CONTRIBUTORS.publisher.join(', '));
|
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);
|
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)) {
|
||||||
writer.setFrame('TCOP', `${RELEASE_YEAR} ${track.SNG_CONTRIBUTORS.main_artist[0]}`);
|
if (track.SNG_CONTRIBUTORS.main_artist) {
|
||||||
|
writer.setFrame('TCOP', `${RELEASE_YEAR} ${track.SNG_CONTRIBUTORS.main_artist[0]}`);
|
||||||
|
}
|
||||||
if (track.SNG_CONTRIBUTORS.publisher) {
|
if (track.SNG_CONTRIBUTORS.publisher) {
|
||||||
writer.setFrame('TPUB', track.SNG_CONTRIBUTORS.publisher.join(', '));
|
writer.setFrame('TPUB', track.SNG_CONTRIBUTORS.publisher.join(', '));
|
||||||
}
|
}
|
||||||
|
@ -44,17 +44,19 @@ interface songType {
|
|||||||
SMARTRADIO: string; // 0
|
SMARTRADIO: string; // 0
|
||||||
SNG_ID: string; // '3135556'
|
SNG_ID: string; // '3135556'
|
||||||
SNG_TITLE: string; // 'Harder, Better, Faster, Stronger'
|
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']
|
main_artist: string[]; //['Daft Punk']
|
||||||
composer?: string[];
|
author?: string[]; // ['Edwin Birdsong', 'Guy-Manuel de Homem-Christo', 'Thomas Bangalter']
|
||||||
musicpublisher?: string[];
|
composer?: string[];
|
||||||
producer?: string[];
|
musicpublisher?: string[];
|
||||||
publisher: string[];
|
producer?: string[];
|
||||||
engineer?: string[];
|
publisher: string[];
|
||||||
writer?: string[];
|
engineer?: string[];
|
||||||
mixer?: string[];
|
writer?: string[];
|
||||||
};
|
mixer?: string[];
|
||||||
|
}
|
||||||
|
| [];
|
||||||
STATUS: number; // 3
|
STATUS: number; // 3
|
||||||
S_MOD: number; // 0
|
S_MOD: number; // 0
|
||||||
S_PREMIUM: number; // 0
|
S_PREMIUM: number; // 0
|
||||||
|
Loading…
x
Reference in New Issue
Block a user