mirror of
https://github.com/unshackle-dl/unshackle.git
synced 2026-11-29 20:45:11 +00:00
refactor(remote): hold who licenses a remote session as one licensing mode
This commit is contained in:
@@ -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 = {}
|
||||
|
||||
Reference in New Issue
Block a user