Enable quickplay on season episode list

This commit is contained in:
cewert 2020-12-08 15:05:22 -05:00
parent 45c82fabdd
commit 85dc14f0c6
4 changed files with 17 additions and 0 deletions

View File

@ -8,6 +8,7 @@
<field id="showID" type="string" />
<field id="seasonID" type="string" />
<field id="overview" type="string" />
<field id="type" type="string" value="Episode" />
<field id="json" type="associativearray" onChange="setFields" />
<function name="loadSeasons" />
</interface>

View File

@ -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

View File

@ -5,6 +5,7 @@
</children>
<interface>
<field id="episodeSelected" alias="picker.itemSelected" />
<field id="quickPlayNode" type="node" alwaysNotify="true" />
<field id="seasonData" type="associativearray" onChange="setSeason" />
<field id="objects" alias="picker.objects" />
</interface>

View File

@ -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