diff --git a/Makefile b/Makefile index 59ac987eb..126dbf77d 100644 --- a/Makefile +++ b/Makefile @@ -3,7 +3,7 @@ # If you want to get_images, you'll also need convert from ImageMagick ########################################################################## -VERSION := 2.0.2 +VERSION := 2.0.3 ## usage diff --git a/components/ItemGrid/LoadVideoContentTask.bs b/components/ItemGrid/LoadVideoContentTask.bs index d8e212dd0..eaef5ae3a 100644 --- a/components/ItemGrid/LoadVideoContentTask.bs +++ b/components/ItemGrid/LoadVideoContentTask.bs @@ -249,7 +249,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 diff --git a/manifest b/manifest index 5ecc09266..32fa52686 100644 --- a/manifest +++ b/manifest @@ -3,7 +3,7 @@ title=Jellyfin major_version=2 minor_version=0 -build_version=2 +build_version=3 ### Main Menu Icons / Channel Poster Artwork diff --git a/package.json b/package.json index f45ee2dc7..bf3e98841 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "jellyfin-roku", "type": "module", - "version": "2.0.2", + "version": "2.0.3", "description": "Roku app for Jellyfin media server", "dependencies": { "@rokucommunity/bslib": "0.1.1", diff --git a/source/Main.bs b/source/Main.bs index 2ef81455d..af425759e 100644 --- a/source/Main.bs +++ b/source/Main.bs @@ -282,7 +282,19 @@ sub Main (args as dynamic) as void 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) diff --git a/source/static/whatsNew/2.0.3.json b/source/static/whatsNew/2.0.3.json new file mode 100644 index 000000000..bf9ba105d --- /dev/null +++ b/source/static/whatsNew/2.0.3.json @@ -0,0 +1,10 @@ +[ + { + "description": "Fix playback of movie additional parts", + "author": "1hitsong" + }, + { + "description": "Fix crash if video has no audio stream", + "author": "1hitsong" + } +] \ No newline at end of file