online: parse UK as an array (1 key plain, 32 keys forensic)

The key service now always returns {"UK":[...]} - an array of one for a
plain movie sample, or all 32 index-ordered variant keys for a forensic
sample. OnlineSource::query accepts both the legacy string form and the
array form, emitting one UnitKey per element (index = array position).
Re-export MIN_SAMPLE_UNITS so callers size their samples correctly.
This commit is contained in:
Matthew Jackson
2026-07-16 19:41:44 -07:00
parent 28bc965fa1
commit 6d1bb64b46
3 changed files with 61 additions and 18 deletions
+1 -1
View File
@@ -1466,7 +1466,7 @@ mod tests {
let original = std::fs::read(&unit_path).unwrap();
assert_eq!(original.len(), libfreemkv::aacs::content::ALIGNED_UNIT_LEN);
assert!(
libfreemkv::aacs::content::ts_sync_destroyed(&original),
!libfreemkv::aacs::content::is_clean(&original, libfreemkv::disc::ContentFormat::BdTs),
"Unit should be encrypted"
);