Enable quickplay in itemgrid2

This commit is contained in:
cewert 2020-12-08 04:08:19 -05:00
parent a44de34b24
commit 45c82fabdd
3 changed files with 10 additions and 0 deletions

View File

@ -340,6 +340,13 @@ function onKeyEvent(key as string, press as boolean) as boolean
optionsClosed()
return true
end if
else if key = "play" then
markupGrid = m.top.getChild(2)
itemToPlay = markupGrid.content.getChild(markupGrid.itemFocused)
if itemToPlay <> invalid and (itemToPlay.type = "Movie" or itemToPlay.type = "Episode") then
m.top.quickPlayNode = itemToPlay
end if
return true
end if
return false
end function

View File

@ -33,6 +33,7 @@
<interface>
<field id="parentItem" type="node" onChange="loadInitialItems" />
<field id="selectedItem" type="node" alwaysNotify="true" />
<field id="quickPlayNode" type="node" alwaysNotify="true" />
<field id="imageDisplayMode" type="string" value="scaleToZoom" />
</interface>
<script type="text/brightscript" uri="pkg:/source/utils/misc.brs" />

View File

@ -200,6 +200,7 @@ function CreateMovieListGroup(libraryItem)
group.parentItem = libraryItem
group.observeField("selectedItem", m.port)
group.observeField("quickPlayNode", m.port)
sidepanel = group.findNode("options")
movie_options = [
@ -292,6 +293,7 @@ function CreateCollectionsList(libraryItem)
group.parentItem = libraryItem
group.observeField("selectedItem", m.port)
group.observeField("quickPlayNode", m.port)
sidepanel = group.findNode("options")