Fix json parsing with invalid chars like \u0000 preventing some channels from loading

This commit is contained in:
Brahim Hadriche committed 2025-11-14 15:47:49 -05:00
1 parent 9a319eab75
commit b5261d900f
27 files changed
+61 -32

No files matched your search

@@ -86,7 +86,7 @@ namespace LoungeVideoQueue
' - eventDetails is of the form {"eventType":"VIDEO_REMOVED","videoId":"<videoId>"}
eventDetails = playlistData[FIELD_EVENT_DETAILS]
if IsString(eventDetails)
eventDetails = ParseJson(eventDetails)
eventDetails = StringUtils.ParseJsonSafe(eventDetails)
end if
if eventDetails <> invalid and eventDetails["eventType"] = "VIDEO_ADDED"
eventVideoId = eventDetails[FIELD_VIDEO_ID]