Skip to content

Commit

Permalink
Merge pull request #1873 from cewert/fix-loadvideocontenttask-crash
Browse files Browse the repository at this point in the history
  • Loading branch information
cewert authored Jul 31, 2024
2 parents 3b13fab + 190d9b0 commit e2c390a
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions components/ItemGrid/LoadVideoContentTask.bs
Original file line number Diff line number Diff line change
Expand Up @@ -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 = []
Expand Down

0 comments on commit e2c390a

Please sign in to comment.