Merge pull request #1189 from 1hitsong/fixNextEpisodeButton
This commit is contained in:
commit
a5b0c6333f
|
@ -20,6 +20,11 @@ sub init()
|
||||||
m.nextEpisodeButton.text = tr("Next Episode")
|
m.nextEpisodeButton.text = tr("Next Episode")
|
||||||
m.nextEpisodeButton.setFocus(false)
|
m.nextEpisodeButton.setFocus(false)
|
||||||
m.nextupbuttonseconds = get_user_setting("playback.nextupbuttonseconds", "30")
|
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.showNextEpisodeButtonAnimation = m.top.findNode("showNextEpisodeButton")
|
||||||
m.hideNextEpisodeButtonAnimation = m.top.findNode("hideNextEpisodeButton")
|
m.hideNextEpisodeButtonAnimation = m.top.findNode("hideNextEpisodeButton")
|
||||||
|
@ -87,7 +92,6 @@ end sub
|
||||||
'
|
'
|
||||||
' Runs Next Episode button animation and sets focus to button
|
' Runs Next Episode button animation and sets focus to button
|
||||||
sub showNextEpisodeButton()
|
sub showNextEpisodeButton()
|
||||||
if m.top.content.contenttype <> 4 then return
|
|
||||||
if m.global.userConfig.EnableNextEpisodeAutoPlay and not m.nextEpisodeButton.visible
|
if m.global.userConfig.EnableNextEpisodeAutoPlay and not m.nextEpisodeButton.visible
|
||||||
m.showNextEpisodeButtonAnimation.control = "start"
|
m.showNextEpisodeButtonAnimation.control = "start"
|
||||||
m.nextEpisodeButton.setFocus(true)
|
m.nextEpisodeButton.setFocus(true)
|
||||||
|
@ -98,7 +102,7 @@ end sub
|
||||||
'
|
'
|
||||||
'Update count down text
|
'Update count down text
|
||||||
sub updateCount()
|
sub updateCount()
|
||||||
nextEpisodeCountdown = Int(m.top.runTime - m.top.position)
|
nextEpisodeCountdown = Int(m.top.duration - m.top.position)
|
||||||
if nextEpisodeCountdown < 0
|
if nextEpisodeCountdown < 0
|
||||||
nextEpisodeCountdown = 0
|
nextEpisodeCountdown = 0
|
||||||
end if
|
end if
|
||||||
|
@ -116,8 +120,9 @@ end sub
|
||||||
' Checks if we need to display the Next Episode button
|
' Checks if we need to display the Next Episode button
|
||||||
sub checkTimeToDisplayNextEpisode()
|
sub checkTimeToDisplayNextEpisode()
|
||||||
if m.top.content.contenttype <> 4 then return
|
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()
|
showNextEpisodeButton()
|
||||||
updateCount()
|
updateCount()
|
||||||
return
|
return
|
||||||
|
|
Loading…
Reference in New Issue
Block a user