Update API docs
This commit is contained in:
parent
31f91c7500
commit
244823f470
|
@ -251,7 +251,14 @@ function defaultSubtitleTrackFromVid(videoID) as integer
|
|||
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
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue
Block a user