fix(home): plumb album awards through backend + invalidate stale home cache
The ribbon feature relied on album.awards arriving on the frontend, but the DiscoverAlbum Rust struct in both qbz-models and src-tauri/api was missing the 'awards' field, so serde silently dropped it during deserialization of /discover/index. Result: frontend always saw an empty awards array and pickAlbumRibbon returned undefined. Also bumps the home sessionStorage cache to schemaVersion 2 so pre-fix caches (which persisted AlbumCardData without ribbon) are discarded on next launch instead of rehydrating with missing fields. cc
This commit is contained in:
3 files changed
+25
-2
No files matched your search
@@ -631,6 +631,10 @@ pub struct DiscoverAlbum {
|
||||
pub genre: Option<Genre>,
|
||||
pub dates: Option<DiscoverAlbumDates>,
|
||||
pub audio_info: Option<DiscoverAudioInfo>,
|
||||
/// Editorial awards attached to the album. Id 88 = Qobuzissime,
|
||||
/// id 151 = Qobuz Album of the Week (locale-stable).
|
||||
#[serde(default)]
|
||||
pub awards: Option<Vec<PageArtistAward>>,
|
||||
}
|
||||
|
||||
/// Album image from discover endpoint
|
||||
|
||||
Reference in new issue
Block a user