Set group to be new video object when autoplaying next ep

This commit is contained in:
Neil Burrows 2021-03-07 15:53:40 +00:00
parent d7d21491cf
commit 398b2cbf11
2 changed files with 4 additions and 1 deletions

View File

@ -424,7 +424,8 @@ sub Main()
if node.showID = invalid then
RemoveCurrentGroup()
else
autoPlayNextEpisode(node.id, node.showID)
nextEpisode =autoPlayNextEpisode(node.id, node.showID)
if nextEpisode <> invalid then group = nextEpisode
end if
else if node.state = "playing" or node.state = "paused" then
ReportPlayback(group, "update")

View File

@ -377,6 +377,7 @@ function autoPlayNextEpisode(videoID as string, showID as string)
nextVideo.setFocus(true)
nextVideo.control = "play"
ReportPlayback(nextVideo, "start")
return nextVideo
else
' can't play next episode
RemoveCurrentGroup()
@ -384,4 +385,5 @@ function autoPlayNextEpisode(videoID as string, showID as string)
else
RemoveCurrentGroup()
end if
return invalid
end function