diff --git a/components/ItemGrid2/ItemGrid2.brs b/components/ItemGrid2/ItemGrid2.brs
index f2fba653..d157d038 100644
--- a/components/ItemGrid2/ItemGrid2.brs
+++ b/components/ItemGrid2/ItemGrid2.brs
@@ -343,6 +343,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
diff --git a/components/ItemGrid2/ItemGrid2.xml b/components/ItemGrid2/ItemGrid2.xml
index 18cb075c..d829eacb 100644
--- a/components/ItemGrid2/ItemGrid2.xml
+++ b/components/ItemGrid2/ItemGrid2.xml
@@ -33,6 +33,7 @@
+
diff --git a/components/data/TVEpisodeData.xml b/components/data/TVEpisodeData.xml
index a5e4050a..df5a6307 100644
--- a/components/data/TVEpisodeData.xml
+++ b/components/data/TVEpisodeData.xml
@@ -8,6 +8,7 @@
+
diff --git a/components/home/Home.xml b/components/home/Home.xml
index 42538e8d..f0eb64c2 100644
--- a/components/home/Home.xml
+++ b/components/home/Home.xml
@@ -7,6 +7,7 @@
+
diff --git a/components/home/HomeRows.brs b/components/home/HomeRows.brs
index b4c55581..40a928a6 100644
--- a/components/home/HomeRows.brs
+++ b/components/home/HomeRows.brs
@@ -313,7 +313,17 @@ function itemSelected()
end function
function onKeyEvent(key as string, press as boolean) as boolean
- return false
+ handled = false
+ if press then
+ if key = "play" then
+ itemToPlay = m.top.content.getChild(m.top.rowItemFocused[0]).getChild(m.top.rowItemFocused[1])
+ if itemToPlay <> invalid and (itemToPlay.type = "Movie" or itemToPlay.type = "Episode") then
+ m.top.quickPlayNode = itemToPlay
+ end if
+ handled = true
+ end if
+ end if
+ return handled
end function
function filterNodeArray(nodeArray as object, nodeKey as string, excludeArray as object) as object
diff --git a/components/home/HomeRows.xml b/components/home/HomeRows.xml
index b482e8f5..159a1c34 100644
--- a/components/home/HomeRows.xml
+++ b/components/home/HomeRows.xml
@@ -3,6 +3,7 @@
+
diff --git a/components/tvshows/TVEpisodes.brs b/components/tvshows/TVEpisodes.brs
index 41ff88cd..92f7dd23 100644
--- a/components/tvshows/TVEpisodes.brs
+++ b/components/tvshows/TVEpisodes.brs
@@ -5,3 +5,17 @@ end sub
sub setSeason()
m.top.overhangTitle = m.top.seasonData.SeriesName + " - " + m.top.seasonData.name
end sub
+
+function onKeyEvent(key as string, press as boolean) as boolean
+ handled = false
+ if press then
+ if key = "play" then
+ itemToPlay = m.top.focusedChild.content.getChild(m.top.focusedChild.rowItemFocused[0]).getChild(0)
+ if itemToPlay <> invalid and itemToPlay.id <> "" then
+ m.top.quickPlayNode = itemToPlay
+ end if
+ handled = true
+ end if
+ end if
+ return handled
+end function
diff --git a/components/tvshows/TVEpisodes.xml b/components/tvshows/TVEpisodes.xml
index 3753111a..c1ddbf08 100644
--- a/components/tvshows/TVEpisodes.xml
+++ b/components/tvshows/TVEpisodes.xml
@@ -5,6 +5,7 @@
+
diff --git a/source/Main.brs b/source/Main.brs
index 174a6b73..389b5d3b 100644
--- a/source/Main.brs
+++ b/source/Main.brs
@@ -81,6 +81,24 @@ sub Main()
else
group.setFocus(true)
end if
+ else if isNodeEvent(msg, "quickPlayNode")
+ reportingNode = msg.getRoSGNode()
+ itemNode = reportingNode.quickPlayNode
+ if itemNode = invalid or itemNode.id = "" then return
+ if itemNode.type = "Episode" or itemNode.type = "Movie" or itemNode.type = "Video" then
+ video = CreateVideoPlayerGroup(itemNode.id)
+ if video <> invalid then
+ group.lastFocus = group.focusedChild
+ group.setFocus(false)
+ group.visible = false
+ group = video
+ m.scene.appendChild(group)
+ group.setFocus(true)
+ group.control = "play"
+ ReportPlayback(group, "start")
+ m.overhang.visible = false
+ end if
+ end if
else if isNodeEvent(msg, "selectedItem")
' If you select a library from ANYWHERE, follow this flow
selectedItem = msg.getData()
diff --git a/source/ShowScenes.brs b/source/ShowScenes.brs
index a57af2d5..cf1e9228 100644
--- a/source/ShowScenes.brs
+++ b/source/ShowScenes.brs
@@ -159,6 +159,7 @@ function CreateHomeGroup()
group = CreateObject("roSGNode", "Home")
group.observeField("selectedItem", m.port)
+ group.observeField("quickPlayNode", m.port)
sidepanel = group.findNode("options")
sidepanel.observeField("closeSidePanel", m.port)
@@ -199,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 = [
@@ -281,6 +283,7 @@ function CreateSeasonDetailsGroup(series, season)
group.objects = TVEpisodes(series.id, season.id)
group.observeField("episodeSelected", m.port)
+ group.observeField("quickPlayNode", m.port)
return group
end function
@@ -291,6 +294,7 @@ function CreateCollectionsList(libraryItem)
group.parentItem = libraryItem
group.observeField("selectedItem", m.port)
+ group.observeField("quickPlayNode", m.port)
sidepanel = group.findNode("options")