fix invalid ticks and video errorstate

This commit is contained in:
sevenrats 2023-01-30 20:02:00 -05:00
parent d26ad4a181
commit a5c0a40ee3
2 changed files with 11 additions and 2 deletions

View File

@ -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"

View File

@ -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