fix(remote): let the server's CDM mapping decide the DRM system under server_cdm

A client with a local PlayReady device asked the server for a PlayReady licence on a service the server maps to a Widevine device. Both server_cdm routes now share one candidate list from one config lookup, report the system that licensed in drm_type, and the client adopts it.
This commit is contained in:
imSp4rky
2026-09-22 10:54:31 -06:00
parent d239964f0b
commit 4639d9d496
9 changed files with 478 additions and 82 deletions
@@ -140,6 +140,7 @@ async def test_batch_shares_full_bundle_per_pssh(monkeypatch):
monkeypatch.setattr(handlers, "ensure_track_drm", lambda track, session=None, init_data=None: None)
monkeypatch.setattr(handlers, "find_title_for_track", lambda tid, session: SimpleNamespace())
monkeypatch.setattr(handlers, "detect_cdm_type_for_service", lambda tag, cfg: "playready")
monkeypatch.setattr(handlers, "resolve_device_name", lambda *a, **k: "dev")
monkeypatch.setattr(handlers, "drm_preference_name", lambda track: None)
monkeypatch.setattr(handlers, "extract_pssh_from_track", lambda track, drm: track_pssh[track.id])
monkeypatch.setattr(handlers, "handle_single_server_cdm", fake_single)