don't crash on subtitle streams of unknown language

This commit is contained in:
2024-11-18 14:16:36 -08:00
parent 5fec2c936d
commit 3e4d35241b

View File

@@ -66,7 +66,12 @@ for i in streams:
matched=False
except:
pass
out=str(i["index"])+" "+i["codec_type"]+" "+i["codec_name"]+" "+i["tags"]["language"]
try:
out=str(i["index"])+" "+i["codec_type"]+" "+i["codec_name"]+" "+i["tags"]["language"]
except KeyError:
out=str(i["index"])+" "+i["codec_type"]+" "+i["codec_name"]+" unk"
if sub_lang!="":
matched=False
if i["disposition"]["default"]==1:
out=out+" default"
if i["disposition"]["hearing_impaired"]==1: