Enable favourite filtering on TV Guide
This commit is contained in:
parent
10ca08bdf8
commit
e10cf817c5
|
@ -328,6 +328,7 @@ sub showTVGuide()
|
|||
m.top.signalBeacon("EPGLaunchInitiate") ' Required Roku Performance monitoring
|
||||
end if
|
||||
m.tvGuide.observeField("watchChannel", "onChannelSelected")
|
||||
m.tvGuide.filter = m.options.filter
|
||||
m.top.appendChild(m.tvGuide)
|
||||
m.tvGuide.lastFocus.setFocus(true)
|
||||
end sub
|
||||
|
|
|
@ -30,7 +30,7 @@ sub loadItems()
|
|||
' do nothing
|
||||
else if filter = "Favorites"
|
||||
params.append({ Filters: "IsFavorite" })
|
||||
params.append({ isFavorite: true})
|
||||
params.append({ isFavorite: true })
|
||||
end if
|
||||
|
||||
if m.top.ItemType <> ""
|
||||
|
|
|
@ -7,11 +7,13 @@ sub loadChannels()
|
|||
results = []
|
||||
|
||||
params = {
|
||||
UserId: get_setting("active_user")
|
||||
'limit: m.top.limit,
|
||||
'StartIndex: m.top.startIndex
|
||||
UserId: get_setting("active_user"),
|
||||
}
|
||||
|
||||
if m.top.filter = "Favorites"
|
||||
params.append({ isFavorite: true })
|
||||
end if
|
||||
|
||||
url = "LiveTv/Channels"
|
||||
|
||||
resp = APIRequest(url, params)
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
<interface>
|
||||
<field id="limit" type="integer" value="" />
|
||||
<field id="startIndex" type="integer" value="0" />
|
||||
<field id="filter" type="string" value="All" />
|
||||
|
||||
<!-- Total records available from server-->
|
||||
<field id="channels" type="array" />
|
||||
|
|
|
@ -28,6 +28,17 @@ sub init()
|
|||
m.channelIndex = {}
|
||||
end sub
|
||||
|
||||
sub channelFilterSet()
|
||||
print "Channel Filter set"
|
||||
if m.top.filter <> invalid and m.LoadChannelsTask.filter <> m.top.filter
|
||||
if m.LoadChannelsTask.state = "run" then m.LoadChannelsTask.control = "stop"
|
||||
|
||||
m.LoadChannelsTask.filter = m.top.filter
|
||||
m.LoadChannelsTask.control = "RUN"
|
||||
end if
|
||||
|
||||
end sub
|
||||
|
||||
' Initial list of channels loaded
|
||||
sub onChannelsLoaded()
|
||||
gridData = createObject("roSGNode", "ContentNode")
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
</children>
|
||||
<interface>
|
||||
<field id="watchChannel" type="node" alwaysNotify="false" />
|
||||
<field id="filter" type="string" value="All" onChange="channelFilterSet" />
|
||||
</interface>
|
||||
<script type="text/brightscript" uri="schedule.brs" />
|
||||
</component>
|
||||
|
|
Loading…
Reference in New Issue
Block a user