refactor(remote): hold who licenses a remote session as one licensing mode

This commit is contained in:
imSp4rky
2026-11-29 10:16:08 -07:00
parent d4af4c77f4
commit efd8ca65c7
18 changed files with 458 additions and 160 deletions
+3 -1
View File
@@ -4,6 +4,7 @@ from types import SimpleNamespace
from typing import Any
from uuid import UUID
from unshackle.core.remote_protocol import LicensingMode, Licensor
from unshackle.core.remote_service import RemoteService, ServerVault
from unshackle.core.title_source import KeyArrival
@@ -15,7 +16,8 @@ def remote_keys(
) -> RemoteService:
"""A RemoteService with only the state dl reads through ServerKeySource, and no server."""
svc = RemoteService.__new__(RemoteService)
svc._server_cdm = server_cdm
if server_cdm is not None:
svc.licensing = LicensingMode(Licensor.SERVER_CDM if server_cdm else Licensor.CLIENT_DEVICE)
svc.server_cdm_type = server_cdm_type
svc.client_licensed = set()
svc.deferred_refusals = {}