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:
vicrodh committed 2026-05-26 20:10:09 -06:00
1 parent 56c924d8ea
commit 12048bcee0
6 files changed
+171 -29

No files matched your search

+4
View File
@@ -1158,6 +1158,10 @@ export global LabelState {
in property <[AlbumCardItem]> albums: [];
in property <[AlbumCardItem]> visible: [];
in property <int> total: 0;
// Whether the catalog has more pages to fetch (drives Load more). The
// /label/getAlbums endpoint caps each page well below the full catalog,
// so this is the reliable signal — `total` is often unset/underset.
in property <bool> has-more: false;
in property <bool> loading: false;
in property <bool> load-more-loading: false;
// "grid" | "list" — the view toggle (mirrors DiscoverBrowseView).