DASH: improved forced subtitle recognition

Some manifests uses value `forced_subtitle` instead of the regular `forced-subtitle`.
This way both are recognized.
This commit is contained in:
Hollander_1908 2023-03-14 12:56:34 +01:00 committed by GitHub
parent 36c530ccc6
commit 5eedbe1f59
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -124,7 +124,8 @@ class DASH:
for x in adaptation_set.findall("Accessibility") for x in adaptation_set.findall("Accessibility")
) )
forced = any( 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") for x in adaptation_set.findall("Role")
) )
cc = any( cc = any(