qobuz: fallback to album artist if track has missing performer

yes, that's a thing. wtf man
https://open.qobuz.com/track/571707
This commit is contained in:
uh wot 2024-08-19 18:16:37 +02:00
parent 0aac14a3f3
commit 34fba212d2
No known key found for this signature in database
GPG Key ID: CB2454984587B781

View File

@ -111,12 +111,16 @@ export interface RawTrack {
}
export function parseTrack(raw: RawTrack): Track {
const artists = []
const artist = raw.performer ?? raw.album?.artist
if (artist) artists.push(parseArtist(artist))
let track: Track = {
title: raw.version ? `${raw.title} (${raw.version})` : raw.title,
id: raw.id.toString(),
url: `https://play.qobuz.com/track/${raw.id.toString()}`,
copyright: raw.copyright,
artists: [parseArtist(raw.performer)],
artists,
durationMs: raw.duration * 1000,
explicit: raw.parental_warning,
isrc: raw.isrc,