Add unplayed count to season poster
This commit is contained in:
parent
077b96df9c
commit
53b53661aa
|
@ -6,6 +6,8 @@ sub init()
|
|||
m.Random = m.top.findNode("Random")
|
||||
m.tvEpisodeRow = m.top.findNode("tvEpisodeRow")
|
||||
|
||||
m.unplayedCount = m.top.findNode("unplayedCount")
|
||||
m.unplayedEpisodeCount = m.top.findNode("unplayedEpisodeCount")
|
||||
|
||||
m.rows.observeField("doneLoading", "updateSeason")
|
||||
end sub
|
||||
|
@ -15,6 +17,11 @@ sub setSeasonLoading()
|
|||
end sub
|
||||
|
||||
sub updateSeason()
|
||||
if m.top.seasonData.UserData.UnplayedItemCount > 0
|
||||
m.unplayedCount.visible = true
|
||||
m.unplayedEpisodeCount.text = m.top.seasonData.UserData.UnplayedItemCount
|
||||
end if
|
||||
|
||||
imgParams = { "maxHeight": 450, "maxWidth": 300 }
|
||||
m.poster.uri = ImageURL(m.top.seasonData.Id, "Primary", imgParams)
|
||||
m.Random.visible = true
|
||||
|
|
|
@ -1,7 +1,11 @@
|
|||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<component name="TVEpisodes" extends="JFGroup">
|
||||
<children>
|
||||
<Poster id="seasonPoster" width="300" height="450" translation="[95,175]" />
|
||||
<Poster id="seasonPoster" width="300" height="450" translation="[95,175]">
|
||||
<Rectangle id="unplayedCount" visible="false" width="90" height="60" color="#00a4dcFF" translation="[210, 0]">
|
||||
<Label id="unplayedEpisodeCount" width="90" height="60" font="font:SmallestBoldSystemFont" horizAlign="center" vertAlign="center" />
|
||||
</Rectangle>
|
||||
</Poster>
|
||||
<JFButton id="Random" text="Play Random" translation="[90, 640]" visible="false"></JFButton>
|
||||
<TVEpisodeRowWithOptions id="picker" visible="true" />
|
||||
</children>
|
||||
|
|
Loading…
Reference in New Issue
Block a user