mirror of
https://github.com/unshackle-dl/unshackle.git
synced 2026-12-04 06:55:09 +00:00
feat(drm): license a plugin DRM at the licence step and over --remote with the client's plugin device
This commit is contained in:
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user