fix(remote): stop at the licence step when a licence fails, falling back only to the service's cdm entry

This commit is contained in:
imSp4rky
2026-12-04 16:31:28 -07:00
parent dd524f2cb2
commit 3bdca22bc7
10 changed files with 355 additions and 48 deletions
@@ -233,9 +233,11 @@ def test_the_server_reads_the_head_of_a_one_file_track_with_drm(example_plugins,
)
def test_a_track_the_reply_lists_as_clear_draws_no_warning(caplog):
"""A requested track the server lists in clear_tracks carries no DRM, so its
missing keys are expected and draw no warning."""
def test_only_an_unanswered_track_draws_a_debug_line(caplog):
"""A requested track the server lists in clear_tracks carries no DRM, so its missing keys draw no line.
An unanswered track gets a debug line only: its own licence follows, and that one fails the run.
"""
video_track = SimpleNamespace(id="v-1", drm=None)
audio_track = SimpleNamespace(id="a-1", drm=None)
@@ -243,10 +245,12 @@ def test_a_track_the_reply_lists_as_clear_draws_no_warning(caplog):
videos = [video_track]
audio = [audio_track]
with caplog.at_level(logging.WARNING):
with caplog.at_level(logging.DEBUG):
install_reply({"keys": {}, "clear_tracks": ["a-1"]}, SimpleNamespace(tracks=Tracks([video_track, audio_track])))
assert caplog.messages == ["Server CDM returned no content keys for track simplenamespace (v-1)"]
assert [(r.levelname, r.message) for r in caplog.records if "no content keys" in r.message] == [
("DEBUG", "Server CDM returned no content keys for track simplenamespace (v-1)")
]
def test_the_batch_takes_the_key_of_a_whole_file_cipher(caplog):