jf-roku/components/data/VideoData.brs

21 lines
564 B
Plaintext
Raw Normal View History

sub setFields()
2020-10-27 17:12:18 +00:00
json = m.top.json
2020-10-27 17:12:18 +00:00
m.top.id = json.id
m.top.Title = json.name
m.top.Description = json.overview
m.top.favorite = json.UserData.isFavorite
m.top.watched = json.UserData.played
m.top.Type = "Video"
2020-10-27 17:12:18 +00:00
setPoster()
end sub
sub setPoster()
if m.top.image <> invalid
m.top.posterURL = m.top.image.url
2020-10-27 17:12:18 +00:00
else if m.top.json.ImageTags.Primary <> invalid then
imgParams = { "maxHeight": 440, "maxWidth": 295, "Tag": m.top.json.ImageTags.Primary }
m.top.posterURL = ImageURL(m.top.json.id, "Primary", imgParams)
end if
2020-10-27 17:12:18 +00:00
end sub