Fix a typo, and lazy load TV show seasons

This commit is contained in:
Nick Bisby 2019-03-12 21:58:04 -05:00
parent 58f985bc06
commit 842f552baf
No known key found for this signature in database
GPG Key ID: F6E0C4E6D0B5EB36
4 changed files with 11 additions and 3 deletions

View File

@ -9,7 +9,7 @@
id="overhang"
title="Movies"
/>
<Rectangle id="footBackdrop" />
<Rectangle id="footerBackdrop" />
<Pager id="pager" />
</children>
</component>

View File

@ -8,7 +8,7 @@
<field id="seasons" type="associativearray" />
<field id="nextup" type="associativearray" />
<field id="full_data" type="associativearray" onChange="setFields" />
<function name="getPoster" />
<function name="loadSeasons" />
</interface>
<script type="text/brightscript" uri="pkg:/source/config.brs" />
<script type="text/brightscript" uri="pkg:/source/JellyfinAPI.brs" />
@ -23,6 +23,12 @@
'm.top.seasons = TVSeasons(datum.id)
'm.top.nextup = TVNext(datum.id)
end sub
sub loadSeasons()
datum = m.top.full_data
m.top.seasons = TVSeasons(datum.id)
end sub
]]>
</script>
</component>

View File

@ -33,6 +33,7 @@ end sub
sub setSeasons()
itemData = m.top.itemContent
itemData.callFunc("loadSeasons")
row = m.top.findNode("TVSeasonSelect")
row.TVSeasonData = itemData.seasons

View File

@ -1,7 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?>
<component name="TVShows" extends="Scene">
<children>
<Pager id="pager" />
<TVShowRow
id="TVShowSelect"
visible="true"
@ -10,5 +9,7 @@
id="overhang"
title="TV Shows"
/>
<Rectangle id="footerBackdrop" />
<Pager id="pager" />
</children>
</component>