From 46a037a1c98f7a99b10787e3dbac723ad2b22c1b Mon Sep 17 00:00:00 2001 From: 1hitsong <3330318+1hitsong@users.noreply.github.com> Date: Tue, 11 Apr 2023 16:36:38 -0400 Subject: [PATCH 1/2] Fix episode reporting for Next Up data Fixes #1186 --- components/JFVideo.brs | 2 -- 1 file changed, 2 deletions(-) diff --git a/components/JFVideo.brs b/components/JFVideo.brs index c8a0540b..17474a58 100644 --- a/components/JFVideo.brs +++ b/components/JFVideo.brs @@ -28,8 +28,6 @@ sub init() m.getNextEpisodeTask = createObject("roSGNode", "GetNextEpisodeTask") m.getNextEpisodeTask.observeField("nextEpisodeData", "onNextEpisodeDataLoaded") - m.top.observeField("state", "onState") - m.top.observeField("content", "onContentChange") m.top.observeField("allowCaptions", "onAllowCaptionsChange") end sub From 454669603536e2d7813eb1022873e18a8fe92e41 Mon Sep 17 00:00:00 2001 From: 1hitsong <3330318+1hitsong@users.noreply.github.com> Date: Tue, 11 Apr 2023 17:33:45 -0400 Subject: [PATCH 2/2] Fix display of Next Episode button Fixes #1188 --- components/JFVideo.brs | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/components/JFVideo.brs b/components/JFVideo.brs index c8a0540b..d28ca47c 100644 --- a/components/JFVideo.brs +++ b/components/JFVideo.brs @@ -20,6 +20,11 @@ sub init() m.nextEpisodeButton.text = tr("Next Episode") m.nextEpisodeButton.setFocus(false) m.nextupbuttonseconds = get_user_setting("playback.nextupbuttonseconds", "30") + if isValid(m.nextupbuttonseconds) + m.nextupbuttonseconds = val(m.nextupbuttonseconds) + else + m.nextupbuttonseconds = 30 + end if m.showNextEpisodeButtonAnimation = m.top.findNode("showNextEpisodeButton") m.hideNextEpisodeButtonAnimation = m.top.findNode("hideNextEpisodeButton") @@ -89,7 +94,6 @@ end sub ' ' Runs Next Episode button animation and sets focus to button sub showNextEpisodeButton() - if m.top.content.contenttype <> 4 then return if m.global.userConfig.EnableNextEpisodeAutoPlay and not m.nextEpisodeButton.visible m.showNextEpisodeButtonAnimation.control = "start" m.nextEpisodeButton.setFocus(true) @@ -100,7 +104,7 @@ end sub ' 'Update count down text sub updateCount() - nextEpisodeCountdown = Int(m.top.runTime - m.top.position) + nextEpisodeCountdown = Int(m.top.duration - m.top.position) if nextEpisodeCountdown < 0 nextEpisodeCountdown = 0 end if @@ -118,8 +122,9 @@ end sub ' Checks if we need to display the Next Episode button sub checkTimeToDisplayNextEpisode() if m.top.content.contenttype <> 4 then return + if m.nextupbuttonseconds = 0 then return - if int(m.top.position) >= (m.top.runTime - 30) + if int(m.top.position) >= (m.top.duration - m.nextupbuttonseconds) showNextEpisodeButton() updateCount() return