feat(drm): license a plugin DRM at the licence step and over --remote with the client's plugin device

This commit is contained in:
imSp4rky
2026-12-03 15:51:42 -07:00
parent f1f91a7d5c
commit 0536056ed6
24 changed files with 803 additions and 136 deletions
+9
View File
@@ -37,6 +37,11 @@ def licence(drm: CustomDRM, cdm: ExampleDevice) -> None:
drm.content_keys[kid] = cdm.path.read_bytes().hex()
def kids(drm: CustomDRM) -> list[UUID]:
"""The EXAMPLE ticket is the hex of its KID."""
return [UUID(hex=drm.data["ticket"])] if "ticket" in drm.data else []
def finish(drm: CustomDRM, path: Path, track: Any) -> bool:
FINISHED.append(path)
return True
@@ -61,8 +66,12 @@ EXAMPLE = DrmPlugin(
decrypt=decrypt,
finish=finish,
licence=licence,
kids=kids,
wire_data=("ticket",),
device_suffix=".exd",
load_device=ExampleDevice,
version="1.0",
device_facts=("device_name",),
)
OTHER = DrmPlugin(
id="other",