Fix crash when failing to load caption language map

This commit is contained in:
Brahim Hadriche committed 2026-06-24 09:13:15 -04:00
1 parent 7f7cf55486
commit 9d23efe7e6
1 file changed
+4
@@ -342,6 +342,10 @@ function SetCaptions(metadata as object, service as object, contentNode as objec
end if
isoLanguageList = StringUtils.ParseJsonSafe(ReadAsciiFile("libpkg:/config/ISO-639-1-to-ISO-639-2T.json5"))
if not IsAssociativeArray(isoLanguageList)
LogError("Failed to load ISO-639 language map; skipping captions")
return
end if
instance = service.GetInstance()
subtitleTracks = []