refactor(api): move server key resolution into server_keys and name the tracks reply's DRM system from the licence order

This commit is contained in:
imSp4rky
2026-11-29 11:12:15 -07:00
parent 6758d9e4fa
commit 1571236991
27 changed files with 1233 additions and 958 deletions
+3 -2
View File
@@ -11,7 +11,7 @@ from types import SimpleNamespace
import pytest
from unshackle.commands.dl import cdm_summary
from unshackle.core.api import handlers
from unshackle.core.api import server_keys
from unshackle.core.cdm.client_relay import ClientDeviceCdm
from unshackle.core.cdm.detect import cdm_system, cdm_type_stub, is_playready_cdm, is_remote_cdm, is_widevine_cdm
from unshackle.core.cdm.loader import device_system, load_cdm
@@ -63,7 +63,8 @@ def test_config_and_the_built_cdm_agree(entry, system, tmp_path, monkeypatch):
def test_the_server_settles_a_service_on_its_remote_device_system(tmp_path):
entry = {"name": "x", "type": "decrypt_labs", "secret": "s", "device_name": "SL3000"}
assert (
handlers.detect_cdm_type_for_service("EXAMPLE", app_config(tmp_path, [entry], {"EXAMPLE": "x"})) == "playready"
server_keys.detect_cdm_type_for_service("EXAMPLE", app_config(tmp_path, [entry], {"EXAMPLE": "x"}))
== "playready"
)