Browse channels before tuning and contain Tunarr memory usage
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
sub init()
|
||||
for each id in ["video", "weather", "banner", "channelTitle", "clock", "nowTitle", "nextTitle", "progressTrack", "progress", "playbackStatus", "panel", "panelTitle", "panelStatus", "menu", "bannerTimer", "clockTimer", "retryTimer"]
|
||||
for each id in ["video", "weather", "banner", "channelTitle", "clock", "nowTitle", "nextTitle", "progressTrack", "progress", "playbackStatus", "panel", "panelTitle", "panelStatus", "menu", "bannerTimer", "clockTimer", "retryTimer", "guideDetails", "guideChannelTitle", "guideNow", "guideNext", "guideLater"]
|
||||
m[id] = m.top.FindNode(id)
|
||||
end for
|
||||
m.channels = []
|
||||
@@ -11,6 +11,7 @@ sub init()
|
||||
m.clockReference = CreateObject("roTimespan")
|
||||
|
||||
m.menu.ObserveField("itemSelected", "onMenuSelect")
|
||||
m.menu.ObserveField("itemFocused", "onGuideFocus")
|
||||
m.video.ObserveField("state", "onVideoState")
|
||||
initWeather()
|
||||
m.bannerTimer.ObserveField("fire", "hideBanner")
|
||||
@@ -83,9 +84,8 @@ sub onChannels(event as object)
|
||||
return
|
||||
end if
|
||||
|
||||
closePanel()
|
||||
m.previousIndex = -1
|
||||
tune(0)
|
||||
openGuide()
|
||||
end sub
|
||||
|
||||
function startRequest(request as object, callback as string) as object
|
||||
@@ -305,11 +305,11 @@ function onKeyEvent(key as string, press as boolean) as boolean
|
||||
closePanel()
|
||||
return true
|
||||
end if
|
||||
if key = "options" and m.channelIndex >= 0
|
||||
if m.panel.visible
|
||||
closePanel()
|
||||
else
|
||||
if key = "options" and m.channels.Count() > 0
|
||||
if m.panelMode = "guide"
|
||||
showPanel("options", "retroLabs", m.server.name + " " + m.server.baseUrl, ["Program guide", "Refresh channels", "Change server"])
|
||||
else
|
||||
openGuide()
|
||||
end if
|
||||
return true
|
||||
end if
|
||||
@@ -318,7 +318,7 @@ function onKeyEvent(key as string, press as boolean) as boolean
|
||||
if key = "up" or key = "down"
|
||||
direction = 1
|
||||
if key = "up" then direction = -1
|
||||
tune((m.channelIndex + direction + m.channels.Count()) MOD m.channels.Count())
|
||||
openGuide(direction)
|
||||
return true
|
||||
else if key = "left" or key = "replay"
|
||||
if m.previousIndex >= 0 then tune(m.previousIndex)
|
||||
|
||||
Reference in New Issue
Block a user