mirror of
https://github.com/unshackle-dl/unshackle.git
synced 2026-12-02 05:55:08 +00:00
fix(dash): refuse an encrypted DASH track with no licensable DRM and gate FairPlay-only DASH tracks for a hook service
This commit is contained in:
@@ -164,15 +164,20 @@ def test_best_available_falls_back_to_the_track_that_licenses(
|
||||
assert ids["video"] == ["1080"]
|
||||
|
||||
|
||||
@pytest.mark.parametrize(("service", "expected"), [(Example, "1080"), (Bridged, "2160")], ids=["no-hook", "hook"])
|
||||
@pytest.mark.parametrize(
|
||||
("service", "reason"),
|
||||
[(Example, "FAKE has no FairPlay bridge hook"), (Bridged, "DASH has no FairPlay bridge")],
|
||||
ids=["no-hook", "hook"],
|
||||
)
|
||||
def test_a_dash_adaptation_set_with_only_a_fairplay_content_protection(
|
||||
monkeypatch: pytest.MonkeyPatch, caplog: pytest.LogCaptureFixture, service: type[Example], expected: str
|
||||
monkeypatch: pytest.MonkeyPatch, caplog: pytest.LogCaptureFixture, service: type[Example], reason: str
|
||||
) -> None:
|
||||
source = service(dash=True)
|
||||
|
||||
ids = run(monkeypatch, caplog, source)
|
||||
|
||||
assert ids["video"] == [expected]
|
||||
assert ids["video"] == ["1080"]
|
||||
assert caplog.text.count(f"Left out 1 FairPlay-only track: {reason}") == 1
|
||||
assert source.session.urls == []
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user