Fix crash when failing to load caption language map
This commit is contained in:
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
|
end if
|
||||||
|
|
||||||
isoLanguageList = StringUtils.ParseJsonSafe(ReadAsciiFile("libpkg:/config/ISO-639-1-to-ISO-639-2T.json5"))
|
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()
|
instance = service.GetInstance()
|
||||||
|
|
||||||
subtitleTracks = []
|
subtitleTracks = []
|
||||||
|
|||||||
Reference in new issue
Block a user