From 65d457f3b46965300c0c7bf2b30e9b7cdbbef61a Mon Sep 17 00:00:00 2001 From: vicrodh <103399283+vicrodh@users.noreply.github.com> Date: Thu, 26 Feb 2026 14:38:43 -0600 Subject: [PATCH] feat: add Goody model to qbz-models for album booklets Add Goody struct and goodies field to Album for Qobuz album booklet/liner notes PDF support. --- crates/qbz-models/src/types.rs | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/crates/qbz-models/src/types.rs b/crates/qbz-models/src/types.rs index 78defe80c..47431e4e0 100644 --- a/crates/qbz-models/src/types.rs +++ b/crates/qbz-models/src/types.rs @@ -207,6 +207,28 @@ pub struct Album { pub upc: Option, /// Editorial description/review of the album pub description: Option, + /// Album goodies (booklets, liner notes PDFs) + #[serde(default)] + pub goodies: Option>, +} + +/// A downloadable extra bundled with an album (e.g. PDF booklet) +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct Goody { + #[serde(default)] + pub id: u64, + #[serde(default)] + pub name: String, + #[serde(default)] + pub url: String, + /// Original (full-size) URL + #[serde(default)] + pub original_url: String, + /// File format id (e.g. 21 for PDF) + #[serde(default)] + pub file_format_id: Option, + #[serde(default)] + pub description: Option, } #[derive(Debug, Clone, Serialize, Deserialize)]