diff --git a/components/ItemGrid/LoadVideoContentTask.bs b/components/ItemGrid/LoadVideoContentTask.bs index 83cb4b0da..da03c90e5 100644 --- a/components/ItemGrid/LoadVideoContentTask.bs +++ b/components/ItemGrid/LoadVideoContentTask.bs @@ -395,6 +395,12 @@ sub addAudioStreamsToVideo(video) end sub sub addSubtitlesToVideo(video, meta) + if not isValid(meta) then return + if not isValid(meta.id) then return + if not isValid(m.playbackInfo) then return + if not isValidAndNotEmpty(m.playbackInfo.MediaSources) then return + if not isValid(m.playbackInfo.MediaSources[0].MediaStreams) then return + subtitles = sortSubtitles(meta.id, m.playbackInfo.MediaSources[0].MediaStreams) safesubs = subtitles["all"] subtitleTracks = []