From 9d23efe7e665a0fc14ca3649ca264bb5fb0051f7 Mon Sep 17 00:00:00 2001 From: Brahim Hadriche Date: Wed, 24 Jun 2026 09:13:15 -0400 Subject: [PATCH] Fix crash when failing to load caption language map --- playlet-lib/src/components/VideoPlayer/VideoContentJob.bs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/playlet-lib/src/components/VideoPlayer/VideoContentJob.bs b/playlet-lib/src/components/VideoPlayer/VideoContentJob.bs index 89844c85..edafaed5 100644 --- a/playlet-lib/src/components/VideoPlayer/VideoContentJob.bs +++ b/playlet-lib/src/components/VideoPlayer/VideoContentJob.bs @@ -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 = []