mirror of
https://codeberg.org/lucida/lucida.git
synced 2026-11-20 02:27:27 -05:00
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:
@@ -111,12 +111,16 @@ export interface RawTrack {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export function parseTrack(raw: RawTrack): Track {
|
export function parseTrack(raw: RawTrack): Track {
|
||||||
|
const artists = []
|
||||||
|
const artist = raw.performer ?? raw.album?.artist
|
||||||
|
if (artist) artists.push(parseArtist(artist))
|
||||||
|
|
||||||
let track: Track = {
|
let track: Track = {
|
||||||
title: raw.version ? `${raw.title} (${raw.version})` : raw.title,
|
title: raw.version ? `${raw.title} (${raw.version})` : raw.title,
|
||||||
id: raw.id.toString(),
|
id: raw.id.toString(),
|
||||||
url: `https://play.qobuz.com/track/${raw.id.toString()}`,
|
url: `https://play.qobuz.com/track/${raw.id.toString()}`,
|
||||||
copyright: raw.copyright,
|
copyright: raw.copyright,
|
||||||
artists: [parseArtist(raw.performer)],
|
artists,
|
||||||
durationMs: raw.duration * 1000,
|
durationMs: raw.duration * 1000,
|
||||||
explicit: raw.parental_warning,
|
explicit: raw.parental_warning,
|
||||||
isrc: raw.isrc,
|
isrc: raw.isrc,
|
||||||
|
|||||||
Reference in New Issue
Block a user