Skip to content

Commit

Permalink
Merge pull request #1718 from 1hitsong/noNextEpisode
Browse files Browse the repository at this point in the history
  • Loading branch information
cewert authored Feb 20, 2024
2 parents d4d716e + 9e5ec2f commit 1861dea
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion components/video/VideoPlayerView.bs
Original file line number Diff line number Diff line change
Expand Up @@ -331,6 +331,7 @@ sub onVideoContentLoaded()
m.top.audioIndex = videoContent[0].audioIndex
m.top.transcodeParams = videoContent[0].transcodeparams
m.chapters = videoContent[0].chapters
m.top.showID = videoContent[0].showID

m.osd.itemTitleText = m.top.content.title

Expand Down Expand Up @@ -413,6 +414,11 @@ sub onNextEpisodeDataLoaded()
m.checkedForNextEpisode = true

m.top.observeField("position", "onPositionChanged")

' If there is no next episode, disable next episode button
if m.getNextEpisodeTask.nextEpisodeData.Items.count() <> 2
m.nextupbuttonseconds = 0
end if
end sub

'
Expand Down Expand Up @@ -527,7 +533,7 @@ sub onState(msg)
m.top.backPressed = true
else if m.top.state = "playing"

' Check if next episde is available
' Check if next episode is available
if isValid(m.top.showID)
if m.top.showID <> "" and not m.checkedForNextEpisode and m.top.content.contenttype = 4
m.getNextEpisodeTask.showID = m.top.showID
Expand Down

0 comments on commit 1861dea

Please sign in to comment.