Bucketing now trusts the server release_type: drop the foreign-artist filter that hid band/guest releases (e.g. Vicky Psarakis' Albums were credited to Sicksense), render every non-empty bucket, hide 'Purchase Only' (download), and move 'Other' to the end, collapsed by default. Drop the misleading per-section item counts. New 'Latest release' highlight (last_release) and 'Appears On' track section (tracks_appears_on, previously mislabeled as Compilations). Per-section persisted 5-mode sort (artist_prefs) + per-section load-more capped at 4 pages, reusing get_releases_grid. New dedicated discography page (ArtistReleasesView + artist_releases controller) with sort + infinite scroll, reached via each section's 'See discography' link. Magazine/Stories sidebar tab (artist/story) with 1:1 thumbnails and a Network|Magazine tab switcher; hide the empty similar-artists block to remove the 'no similar' over populated-discovery incoherence. Header Share action. Per-release award ribbons. Fix custom artist AND album images: decode + apply immediately on upload and resolve the local override on navigation, so a custom image now shows for artists/albums with no Qobuz artwork. Data layer: type last_release as PageArtistRelease, add /artist/story endpoint + core/client methods + ArtistStory* models, export ArtistReleases* globals. cc
138 lines
4.0 KiB
Rust
138 lines
4.0 KiB
Rust
//! QBZ Models - Shared types, events, and traits
|
|
//!
|
|
//! This crate provides the foundation for all QBZ crates:
|
|
//! - Type definitions (Track, Album, Artist, etc.)
|
|
//! - Event definitions (CoreEvent enum)
|
|
//! - Trait definitions (FrontendAdapter)
|
|
//! - Playback types (QueueTrack, PlaybackState)
|
|
//! - Error types
|
|
//!
|
|
//! # Architecture
|
|
//!
|
|
//! ```text
|
|
//! ┌─────────────────────────────────────────────────────────────┐
|
|
//! │ qbz-models (Tier 0) │
|
|
//! │ Types, Events, Traits - No dependencies on other qbz-* │
|
|
//! └─────────────────────────────────────────────────────────────┘
|
|
//! ↑
|
|
//! ┌────────────────────────┼────────────────────────┐
|
|
//! │ │ │
|
|
//! ┌───┴───┐ ┌─────┴─────┐ ┌─────┴─────┐
|
|
//! │qbz-audio│ │qbz-qobuz │ │qbz-player │
|
|
//! │ Tier 1 │ │ Tier 1 │ │ Tier 2 │
|
|
//! └────────┘ └───────────┘ └───────────┘
|
|
//! ```
|
|
//!
|
|
//! # Usage
|
|
//!
|
|
//! ```rust
|
|
//! use qbz_models::{Track, Album, CoreEvent, FrontendAdapter};
|
|
//! ```
|
|
|
|
pub mod error;
|
|
pub mod events;
|
|
pub mod mixtape;
|
|
pub mod playback;
|
|
pub mod source;
|
|
pub mod traits;
|
|
pub mod types;
|
|
|
|
// Re-export commonly used types at crate root
|
|
pub use error::{QbzError, QbzResult};
|
|
pub use events::CoreEvent;
|
|
pub use playback::{PlaybackState, PlaybackStatus, QueueState, QueueTrack, RepeatMode};
|
|
pub use source::{plex_thumb_url, ArtworkRef, PlaybackSource, TrackOriginTag};
|
|
pub use traits::{FrontendAdapter, LoggingAdapter, NoOpAdapter};
|
|
pub use types::{
|
|
Album,
|
|
AlbumSuggestResponse,
|
|
AlbumSummary,
|
|
Artist,
|
|
RadioResponse,
|
|
ArtistAlbums,
|
|
ArtistBiography,
|
|
// Discover types
|
|
DiscoverAlbum,
|
|
DiscoverAlbumDates,
|
|
DiscoverAlbumImage,
|
|
DiscoverArtist,
|
|
DiscoverAudioInfo,
|
|
DiscoverContainer,
|
|
DiscoverContainers,
|
|
DiscoverData,
|
|
DiscoverPlaylist,
|
|
DiscoverPlaylistImage,
|
|
DiscoverPlaylistsResponse,
|
|
DiscoverResponse,
|
|
Favorites,
|
|
Genre,
|
|
GenreInfo,
|
|
GenreListContainer,
|
|
GenreListResponse,
|
|
ImageSet,
|
|
Label,
|
|
LabelExploreResponse,
|
|
LabelGetListResponse,
|
|
LabelListPage,
|
|
LabelPageContainer,
|
|
LabelPageData,
|
|
LabelPageGenericList,
|
|
LabelStoryResponse,
|
|
// Award types
|
|
AlbumAward,
|
|
AwardMagazine,
|
|
AwardPageContainer,
|
|
AwardPageData,
|
|
AwardPageGenericList,
|
|
// Artist page types
|
|
ArtistStoryResponse,
|
|
ArtistStoryItem,
|
|
ArtistStoryImage,
|
|
ArtistStoryAuthor,
|
|
PageArtistAward,
|
|
PageArtistBiography,
|
|
PageArtistImages,
|
|
PageArtistName,
|
|
PageArtistPhysicalSupport,
|
|
PageArtistPlaylist,
|
|
PageArtistPlaylistImages,
|
|
PageArtistPlaylistOwner,
|
|
PageArtistPlaylists,
|
|
PageArtistPortrait,
|
|
PageArtistRelease,
|
|
PageArtistReleaseArtist,
|
|
PageArtistReleaseContributor,
|
|
PageArtistReleaseGroup,
|
|
PageArtistResponse,
|
|
PageArtistRights,
|
|
PageArtistSimilar,
|
|
PageArtistSimilarItem,
|
|
PageArtistTrack,
|
|
PageArtistTrackAlbum,
|
|
Playlist,
|
|
PlaylistDuplicateResult,
|
|
PlaylistGenre,
|
|
PlaylistOwner,
|
|
PlaylistTag,
|
|
PlaylistTagsResponse,
|
|
PlaylistWithTrackIds,
|
|
Quality,
|
|
RawPlaylistTag,
|
|
ReleasesGridResponse,
|
|
MostPopularItem,
|
|
SearchAllResults,
|
|
SearchResults,
|
|
SearchResultsPage,
|
|
SessionStartResponse,
|
|
AssetOrigin,
|
|
ExternalStreamAsset,
|
|
StreamQualityInfo,
|
|
StreamRestriction,
|
|
StreamUrl,
|
|
Track,
|
|
TrackFileUrl,
|
|
TrackToAnalyse,
|
|
TracksContainer,
|
|
UserSession,
|
|
};
|