From 85dc14f0c6419f52bff072836b69a6d1ec65cbb1 Mon Sep 17 00:00:00 2001 From: cewert Date: Tue, 8 Dec 2020 15:05:22 -0500 Subject: [PATCH] Enable quickplay on season episode list --- components/data/TVEpisodeData.xml | 1 + components/tvshows/TVEpisodes.brs | 14 ++++++++++++++ components/tvshows/TVEpisodes.xml | 1 + source/ShowScenes.brs | 1 + 4 files changed, 17 insertions(+) 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/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/ShowScenes.brs b/source/ShowScenes.brs index 4484ef36..cf1e9228 100644 --- a/source/ShowScenes.brs +++ b/source/ShowScenes.brs @@ -283,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