v0.30.0: OnlineSource forwards the disc title to the key service

OnlineSource::query() now includes the disc's volume_label (UDF/ISO volume id)
as a plain-text `title` field in the /decode POST, so the key service can build
a disc_hash → title catalog from real rips. Depends on libfreemkv 0.30.
This commit is contained in:
MattJackson
2026-06-06 09:05:48 -07:00
parent f02a62595d
commit 68a2e51bf7
3 changed files with 10 additions and 2 deletions
+1
View File
@@ -127,6 +127,7 @@ mod tests {
mkb: Vec::new(),
unit_key_ro: Vec::new(),
samples: Vec::new(),
volume_label: None,
}
}
+7
View File
@@ -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));