refactor(drm): build PlayReady from base64 with PlayReady.from_pssh_b64 in server keys and the wire rebuild

This commit is contained in:
imSp4rky
2026-11-29 11:35:37 -07:00
parent 1cbaa2d307
commit 0ba9e6dfed
12 changed files with 182 additions and 55 deletions
+2 -6
View File
@@ -1060,12 +1060,8 @@ def test_reconstruct_rest_drm_skips_what_it_cannot_parse(caplog: pytest.LogCaptu
entries = [{"type": "widevine"}, {"type": "playready", "pssh": "!!"}, {"type": "clearkeycenc", "kids": ["x"]}]
with caplog.at_level(logging.WARNING):
assert reconstruct_drm(entries) == []
assert [(r.name, r.getMessage()) for r in caplog.records] == [
(
"remote_service",
"Skipping unparseable playready DRM entry from server: InvalidPssh('Data must not be empty')",
)
]
assert [r.name for r in caplog.records] == ["remote_service"]
assert caplog.messages[0].startswith("Skipping unparseable playready DRM entry from server: InvalidPssh(")
def test_export_drm_decode() -> None: