jf-roku/components/data/ChannelData.brs

25 lines
797 B
Plaintext
Raw Normal View History

import "pkg:/source/api/Image.brs"
import "pkg:/source/api/baserequest.brs"
import "pkg:/source/utils/config.brs"
sub setFields()
json = m.top.json
m.top.id = json.id
2020-11-23 17:13:57 +00:00
m.top.title = json.name
2020-10-17 19:23:20 +00:00
m.top.live = true
m.top.Type = "TvChannel"
setPoster()
end sub
sub setPoster()
if m.top.image <> invalid
m.top.posterURL = m.top.image.url
else if m.top.json.ImageTags <> invalid and m.top.json.ImageTags.Primary <> invalid
imgParams = { "maxHeight": 60, "Tag": m.top.json.ImageTags.Primary }
2022-05-14 10:13:28 +00:00
m.top.hdsmalliconurl = ImageURL(m.top.json.id, "Primary", imgParams)
imgParams = { "maxHeight": 440, "maxWidth": 295, "Tag": m.top.json.ImageTags.Primary }
m.top.posterURL = ImageURL(m.top.json.id, "Primary", imgParams)
end if
end sub