refactor(tracks): make complete_track the one finish step for every track kind

This commit is contained in:
imSp4rky
2026-11-29 14:04:53 -07:00
parent dcbc9de7ba
commit e41760c2b3
14 changed files with 332 additions and 174 deletions
+4 -5
View File
@@ -190,15 +190,14 @@ def test_downloaders_route_through_the_hook(monkeypatch: pytest.MonkeyPatch) ->
"""Every real decrypt site calls decrypt_track, so the dl hook sees it."""
import inspect
from unshackle.core.manifests import dash, hls, ism, segment_pipeline
from unshackle.core.manifests import dash, hls, ism, segment_pipeline, url
from unshackle.core.tracks import track
for module in (segment_pipeline, hls, track):
for module in (segment_pipeline, hls):
assert "decrypt_track(" in inspect.getsource(module), module.__name__
# DASH and ISM decrypt through the pipeline's complete_track, which calls decrypt_track
for module in (dash, ism):
for module in (dash, hls, ism, url):
assert "complete_track(" in inspect.getsource(module), module.__name__
for module in (dash, hls, ism, segment_pipeline, track):
for module in (dash, hls, ism, segment_pipeline, track, url):
src = inspect.getsource(module)
assert "drm.decrypt(save_path)" not in src and "drm.decrypt(merged_path)" not in src, module.__name__