refactor(core): move the title, track and DRM wire form into core/wire.py

This commit is contained in:
imSp4rky
2026-11-24 14:37:51 -07:00
parent e385234a92
commit 55138f95c2
36 changed files with 2250 additions and 907 deletions
+3 -11
View File
@@ -64,18 +64,10 @@ class ClearKeyCENC:
return next(iter(self.kids), None)
def to_dict(self) -> dict[str, Any]:
"""Serialise this DRM instance for export/import (KIDs + license URL).
"""This DRM in the export form; see ``wire.drm_to_dict``."""
from unshackle.core.wire import drm_to_dict
unshackle stores the content keys once at the export's track level, and does not
duplicate them here.
"""
data: dict[str, Any] = {
"system": "ClearKeyCENC",
"kids": [kid.hex for kid in self.kids],
}
if self.laurl:
data["laurl"] = self.laurl
return data
return drm_to_dict(self)
def get_license_challenge(self) -> bytes:
"""Assemble the W3C EME ClearKey JSON license request for the unkeyed KIDs."""