From a5197646930b4bb2cf8856f3e18dff7e0fdbfee0 Mon Sep 17 00:00:00 2001 From: Markus Birth Date: Sun, 22 Aug 2021 21:48:05 +0200 Subject: [PATCH] Handle "unknown_details" structure. --- onepif/OnepifEntry.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/onepif/OnepifEntry.py b/onepif/OnepifEntry.py index 3281df1..62e2b41 100644 --- a/onepif/OnepifEntry.py +++ b/onepif/OnepifEntry.py @@ -146,6 +146,11 @@ class OnepifEntry(): if k in ["openContents", "secureContents"]: # handle open/secure groups of properties for k2, v2 in v.items(): + if k2 == "unknown_details": + # special handling aka. black magic + if "sections" in v2: + k2 = "sections" + v2 = v2["sections"] if k2 == "sections": # handle section for s in v2: