Refresh Roku channels when opening the guide
This commit is contained in:
@@ -20,7 +20,7 @@ IP or hostname. Use `IP:port` if the bridge uses a port other than `4242`.
|
||||
- **Up / Down** opens the guide on the adjacent channel. In the guide, it moves the highlight without tuning.
|
||||
- **OK** tunes the highlighted channel in the guide. During playback it shows the banner or retries a failed channel.
|
||||
- **Left / Right** moves the guide time by 30 minutes. With the guide closed, Left or Replay returns to the last channel.
|
||||
- **Star** opens the guide. Press it from the guide for channel refresh and server selection.
|
||||
- **Right** opens the guide during playback. The guide refreshes the channel list each time it opens.
|
||||
- **Back** closes the guide or menu, then exits from the tuner.
|
||||
|
||||
The app opens on the guide. The guide scrolls three channels at a time in a full-width guide across the bottom third of the picture, with current and upcoming programming for each row. Channel 99 displays local weather. Playback starts from the live HLS playlist supplied by the bridge.
|
||||
|
||||
@@ -86,11 +86,20 @@ sub onGuide(event as object)
|
||||
return
|
||||
end if
|
||||
syncClock(data.serverTime)
|
||||
activeId = invalid
|
||||
previousId = invalid
|
||||
if m.channelIndex >= 0 then activeId = m.channels[m.channelIndex].id
|
||||
if m.previousIndex >= 0 then previousId = m.channels[m.previousIndex].id
|
||||
m.guideChannels = data.channels
|
||||
selected = 0
|
||||
for i = 0 to m.guideChannels.Count() - 1
|
||||
if m.channelIndex >= 0 and m.guideChannels[i].id = m.channels[m.channelIndex].id then selected = i
|
||||
m.channels = data.channels
|
||||
m.channelIndex = -1
|
||||
m.previousIndex = -1
|
||||
for i = 0 to m.channels.Count() - 1
|
||||
if m.channels[i].id = activeId then m.channelIndex = i
|
||||
if m.channels[i].id = previousId then m.previousIndex = i
|
||||
end for
|
||||
selected = m.channelIndex
|
||||
if selected < 0 then selected = 0
|
||||
count = m.guideChannels.Count()
|
||||
m.guideSelected = (selected + m.guideOffset + count) mod count
|
||||
m.guideFirst = 0
|
||||
|
||||
Reference in New Issue
Block a user