mirror of
https://codeberg.org/lucida/lucida.git
synced 2026-11-12 14:47:24 -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 {
|
||||
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,
|
||||
|
||||
Reference in New Issue
Block a user