fix(slint): label albums missing artist/quality/date + favorite + load-more
/label/getAlbums returns the V2 nested album shape (DiscographyAlbumDto:
artists[], audio_info, dates, track_count) — confirmed against the Android
decompiled sources — but it was deserialized into the flat Album model,
which dropped artist, quality and release date (Unknown Artist in
group-by-artist, no quality badge, no date, empty list-row columns).
qbz-models Album: capture the nested V2 fields (audio_info, dates,
track_count, release_type) as optional serde(default) — backward
compatible with the flat-shape endpoints.
label.rs map_album: read nested-first (quality from audio_info, date from
dates, count from track_count, artist from artists[] main-artist, explicit
release_type) with flat fallback. Fixes the releases grid + list columns,
the landing Releases carousel, and Critics' Picks.
Wire ("album","favorite") -> add_favorite + toast (works on every album
card via the shared component).
LabelReleases load-more now driven by has_more (the endpoint caps each
page well below the catalog, so total was an unreliable gate).
cc
This commit is contained in:
6 files changed
+171
-29
No files matched your search
@@ -280,6 +280,23 @@ pub struct Album {
|
||||
pub hires_streamable: bool,
|
||||
pub maximum_sampling_rate: Option<f64>,
|
||||
pub maximum_bit_depth: Option<u32>,
|
||||
/// V2 nested quality block. The modern album shape returned by
|
||||
/// `/label/getAlbums` (DiscographyAlbumDto) and `/discover`-style items
|
||||
/// nests quality here; preferred over the flat `maximum_*` fields.
|
||||
#[serde(default)]
|
||||
pub audio_info: Option<DiscoverAudioInfo>,
|
||||
/// V2 nested release dates (`{original, download, stream}`); preferred
|
||||
/// over the flat `release_date_original` when present.
|
||||
#[serde(default)]
|
||||
pub dates: Option<DiscoverAlbumDates>,
|
||||
/// The V2 wire spells the album track count `track_count` (no trailing
|
||||
/// `s`); the flat shape uses `tracks_count`.
|
||||
#[serde(default)]
|
||||
pub track_count: Option<u32>,
|
||||
/// Explicit release type when provided ("album" | "ep" | "single" |
|
||||
/// "live" | "compilation" | ...).
|
||||
#[serde(default)]
|
||||
pub release_type: Option<String>,
|
||||
#[serde(default)]
|
||||
pub tracks: Option<TracksContainer>,
|
||||
/// Universal Product Code for the album
|
||||
|
||||
Reference in new issue
Block a user