diff --git a/source/Main.brs b/source/Main.brs index 8c3b5831..5e679062 100644 --- a/source/Main.brs +++ b/source/Main.brs @@ -505,7 +505,11 @@ sub Main (args as dynamic) as void else if node.showID = invalid sceneManager.callFunc("popScene") else - autoPlayNextEpisode(node.id, node.showID) + if video.errorMsg = "" + autoPlayNextEpisode(node.id, node.showID) + else + sceneManager.callFunc("popScene") + end if end if end if else if type(msg) = "roDeviceInfoEvent" diff --git a/source/VideoPlayer.brs b/source/VideoPlayer.brs index 051fe47c..73bae24c 100644 --- a/source/VideoPlayer.brs +++ b/source/VideoPlayer.brs @@ -46,7 +46,11 @@ sub AddVideoContent(video, mediaSourceId, audio_stream_idx = 1, subtitle_idx = - end if if m.videotype = "Episode" or m.videotype = "Series" - video.runTime = (meta.json.RunTimeTicks / 10000000.0) + if isValid(meta.json.RunTimeTicks) + video.runTime = (meta.json.RunTimeTicks / 10000000.0) + else + video.runTime = invalid + end if video.content.contenttype = "episode" end if @@ -438,6 +442,7 @@ function getAudioInfo(meta as object) as object end function sub autoPlayNextEpisode(videoID as string, showID as string) + print "THIS CODE IS RUNNING NOW" ' use web client setting if m.user.Configuration.EnableNextEpisodeAutoPlay ' query API for next episode ID