feat(tracks): resume segment decryption and rolling merge through the segment store

This commit is contained in:
imSp4rky
2026-11-28 22:09:44 -07:00
parent f4d178c26b
commit 82991dd823
26 changed files with 1125 additions and 186 deletions
+22
View File
@@ -76,6 +76,28 @@ class Harness:
self.skipped.append(track)
def test_ctrl_c_cancels_the_tracks_still_downloading():
seen = {}
def run_one(track, _index):
if track.id == "a":
raise KeyboardInterrupt
# a deadline, not a delay: without the cancel this waits it out and records False
seen[track.id] = DOWNLOAD_CANCELLED.wait(timeout=10)
with pytest.raises(KeyboardInterrupt):
download_tracks_in_passes(
[make_video(), make_audio()],
2,
run_one,
skip_subtitle_errors=False,
on_subtitle_skipped=lambda track: None,
)
assert seen == {"v": True}
assert DOWNLOAD_CANCELLED.is_set()
@pytest.fixture(autouse=True)
def clear_event():
DOWNLOAD_CANCELLED.clear()