diff --git a/components/ListPoster.brs b/components/ListPoster.brs index 4dc6b6b4a..85ce25a61 100644 --- a/components/ListPoster.brs +++ b/components/ListPoster.brs @@ -2,8 +2,13 @@ sub init() m.title = m.top.findNode("title") m.staticTitle = m.top.findNode("staticTitle") m.poster = m.top.findNode("poster") + m.backdrop = m.top.findNode("backdrop") - m.backdrop.color = "#404040FF" + + ' Randmomise the background colors + posterBackgrounds = [ "#5ccea9", "#d2b019", "#dd452b", "#338abb", "#6b689d" ] + m.backdrop.color = posterBackgrounds[rnd(posterBackgrounds.count()) - 1] + updateSize() end sub diff --git a/components/data/ChannelData.brs b/components/data/ChannelData.brs new file mode 100644 index 000000000..c86907800 --- /dev/null +++ b/components/data/ChannelData.brs @@ -0,0 +1,15 @@ +sub setFields() + json = m.top.json + + m.top.id = json.id + m.top.title = json.name + m.top.live = true +end sub + +sub setPoster() + if m.top.image <> invalid + m.top.posterURL = m.top.image.url + else + m.top.posterURL = "" + end if +end sub diff --git a/components/data/ChannelData.xml b/components/data/ChannelData.xml new file mode 100644 index 000000000..4f291be34 --- /dev/null +++ b/components/data/ChannelData.xml @@ -0,0 +1,11 @@ + + + + + + + + + +