1
0
mirror of https://github.com/spaam/svtplay-dl.git synced 2024-11-24 04:05:39 +01:00

hls: use 'und' when language is missing in subtitle

This commit is contained in:
Johan Andersson 2021-06-17 21:54:31 +02:00
parent 00e5c84196
commit eea6f29d4e

View File

@ -91,7 +91,11 @@ def _hlsparse(config, text, url, output, **kwargs):
if "URI" in i: if "URI" in i:
if i["GROUP-ID"] not in subtitles: if i["GROUP-ID"] not in subtitles:
subtitles[i["GROUP-ID"]] = [] subtitles[i["GROUP-ID"]] = []
item = [i["URI"], i["LANGUAGE"]] if "LANGUAGE" in i:
lang = i["LANGUAGE"]
else:
lang = "und"
item = [i["URI"], lang]
if item not in subtitles[i["GROUP-ID"]]: if item not in subtitles[i["GROUP-ID"]]:
subtitles[i["GROUP-ID"]].append(item) subtitles[i["GROUP-ID"]].append(item)
continue continue