From 5eedbe1f59c2f25cb1938492e530e5f0f377b4c1 Mon Sep 17 00:00:00 2001 From: Hollander_1908 <93162595+Hollander-1908@users.noreply.github.com> Date: Tue, 14 Mar 2023 12:56:34 +0100 Subject: [PATCH] DASH: improved forced subtitle recognition Some manifests uses value `forced_subtitle` instead of the regular `forced-subtitle`. This way both are recognized. --- devine/core/manifests/dash.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/devine/core/manifests/dash.py b/devine/core/manifests/dash.py index e63632a..6bb534d 100644 --- a/devine/core/manifests/dash.py +++ b/devine/core/manifests/dash.py @@ -124,7 +124,8 @@ class DASH: for x in adaptation_set.findall("Accessibility") ) forced = any( - (x.get("schemeIdUri"), x.get("value")) == ("urn:mpeg:dash:role:2011", "forced-subtitle") + x.get("schemeIdUri") == "urn:mpeg:dash:role:2011" + and x.get("value") in ("forced-subtitle", "forced_subtitle") for x in adaptation_set.findall("Role") ) cc = any(