diff --git a/docs/api/components_ItemGrid_LoadVideoContentTask.bs.html b/docs/api/components_ItemGrid_LoadVideoContentTask.bs.html index 6a724c513..301907a77 100644 --- a/docs/api/components_ItemGrid_LoadVideoContentTask.bs.html +++ b/docs/api/components_ItemGrid_LoadVideoContentTask.bs.html @@ -251,7 +251,14 @@ if not isValidAndNotEmpty(meta.json.MediaSources[0].MediaStreams) then return SubtitleSelection.none subtitles = sortSubtitles(meta.id, meta.json.MediaSources[0].MediaStreams) - selectedAudioLanguage = meta.json.MediaSources[0].MediaStreams[m.top.selectedAudioStreamIndex].Language ?? "" + + selectedAudioLanguage = "" + audioMediaStream = meta.json.MediaSources[0].MediaStreams[m.top.selectedAudioStreamIndex] + + ' Ensure audio media stream is valid before using language property + if isValid(audioMediaStream) + selectedAudioLanguage = audioMediaStream.Language ?? "" + end if defaultTextSubs = defaultSubtitleTrack(subtitles["text"], selectedAudioLanguage, true) ' Find correct subtitle track (forced text) if defaultTextSubs <> SubtitleSelection.none diff --git a/docs/api/source_Main.bs.html b/docs/api/source_Main.bs.html index efe676265..3738c0fd2 100644 --- a/docs/api/source_Main.bs.html +++ b/docs/api/source_Main.bs.html @@ -284,7 +284,19 @@ end if ' Display playback options dialog - if selectedItem.json.userdata.PlaybackPositionTicks > 0 + showPlaybackOptionDialog = false + + if isValid(selectedItem.json) + if isValid(selectedItem.json.userdata) + if isValid(selectedItem.json.userdata.PlaybackPositionTicks) + if selectedItem.json.userdata.PlaybackPositionTicks > 0 + showPlaybackOptionDialog = true + end if + end if + end if + end if + + if showPlaybackOptionDialog dialog.close = true m.global.queueManager.callFunc("hold", selectedItem) playbackOptionDialog(selectedItem.json.userdata.PlaybackPositionTicks, selectedItem.json)