mirror of
https://github.com/jellyfin/jellyfin-roku.git
synced 2024-11-23 14:19:40 +00:00
added api to check is next episode is valid
This commit is contained in:
parent
119b14634e
commit
a762e65a75
@ -22,11 +22,13 @@ sub init()
|
||||
|
||||
m.showNextEpisodeButtonAnimation = m.top.findNode("showNextEpisodeButton")
|
||||
m.hideNextEpisodeButtonAnimation = m.top.findNode("hideNextEpisodeButton")
|
||||
|
||||
end sub
|
||||
|
||||
' Event handler for when video content field changes
|
||||
sub onContentChange()
|
||||
m.top.observeField("position", "onPositionChanged")
|
||||
'check if episode has a next episode
|
||||
|
||||
' If video content type is not episode, remove position observer
|
||||
if m.top.content.contenttype <> 4
|
||||
@ -107,6 +109,14 @@ sub onState(msg)
|
||||
m.top.control = "stop"
|
||||
m.top.backPressed = true
|
||||
else if m.top.state = "playing"
|
||||
params = { "UserId": get_setting("active_user"), "adjacentTo": m.top.id }
|
||||
series = m.top.showID
|
||||
nextEpisode = api_API().shows.getepisodes(series, params)
|
||||
print nextEpisode
|
||||
if isValid(nextEpisode)
|
||||
print nextEpisode
|
||||
end if
|
||||
|
||||
if m.playReported = false
|
||||
ReportPlayback("start")
|
||||
m.playReported = true
|
||||
|
@ -27,6 +27,8 @@
|
||||
<script type="text/brightscript" uri="JFVideo.brs" />
|
||||
<script type="text/brightscript" uri="pkg:/source/utils/misc.brs" />
|
||||
<script type="text/brightscript" uri="pkg:/source/utils/config.brs" />
|
||||
<script type="text/brightscript" uri="pkg:/source/roku_modules/api/api.brs" />
|
||||
|
||||
<children>
|
||||
<timer id="playbackTimer" repeat="true" duration="30" />
|
||||
<timer id="bufferCheckTimer" repeat="true" />
|
||||
|
Loading…
Reference in New Issue
Block a user