diff --git a/Cargo.toml b/Cargo.toml index d03aeeb..ff36fd5 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "freemkv-keysources" -version = "0.29.0" +version = "0.30.0" edition = "2024" license = "AGPL-3.0-only" description = "Pluggable AACS key sources (keydb, online key service, mapfile) for libfreemkv. Each source looks a disc up and hands libfreemkv a Key; the library does all derivation." @@ -10,7 +10,7 @@ categories = ["multimedia"] [dependencies] # The crate provides the `KeySource` trait + `Key`/`DiscInputs` types these impls fill. -libfreemkv = "0.29" +libfreemkv = "0.30" # OnlineSource: POST disc inputs + samples to a key service over HTTP. ureq = { version = "2", features = ["json"] } serde_json = "1" diff --git a/src/keydb.rs b/src/keydb.rs index 0435050..0f3c87e 100644 --- a/src/keydb.rs +++ b/src/keydb.rs @@ -127,6 +127,7 @@ mod tests { mkb: Vec::new(), unit_key_ro: Vec::new(), samples: Vec::new(), + volume_label: None, } } diff --git a/src/online.rs b/src/online.rs index c68bbe0..fc39bbc 100644 --- a/src/online.rs +++ b/src/online.rs @@ -54,6 +54,13 @@ impl OnlineSource { .collect(), ); } + // The disc's own title (UDF/ISO volume id), plain text. The key service + // catalogs it by disc_hash (its disc-titles.json) — independent of keydb. + if let Some(label) = inputs.volume_label.as_deref().map(str::trim) { + if !label.is_empty() { + body["title"] = serde_json::Value::String(label.to_string()); + } + } let mut req = ureq::post(&self.base_url).timeout(Duration::from_secs(TIMEOUT_SECS)); if !self.secret.is_empty() { req = req.set("Authorization", &format!("Bearer {}", self.secret));