2023-05-03 21:21:04 +00:00
|
|
|
import "pkg:/source/api/Image.brs"
|
|
|
|
import "pkg:/source/api/baserequest.brs"
|
|
|
|
import "pkg:/source/utils/config.brs"
|
|
|
|
|
2020-05-31 13:46:33 +00:00
|
|
|
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
|
2020-10-17 19:07:32 +00:00
|
|
|
m.top.Type = "TvChannel"
|
2020-10-25 15:45:43 +00:00
|
|
|
setPoster()
|
2020-05-31 13:46:33 +00:00
|
|
|
end sub
|
|
|
|
|
|
|
|
sub setPoster()
|
|
|
|
if m.top.image <> invalid
|
|
|
|
m.top.posterURL = m.top.image.url
|
2021-06-26 13:52:16 +00:00
|
|
|
else if m.top.json.ImageTags <> invalid and m.top.json.ImageTags.Primary <> invalid
|
2022-12-26 20:42:50 +00:00
|
|
|
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)
|
|
|
|
|
2022-12-26 20:42:50 +00:00
|
|
|
imgParams = { "maxHeight": 440, "maxWidth": 295, "Tag": m.top.json.ImageTags.Primary }
|
2020-10-25 15:45:43 +00:00
|
|
|
m.top.posterURL = ImageURL(m.top.json.id, "Primary", imgParams)
|
2020-05-31 13:46:33 +00:00
|
|
|
end if
|
|
|
|
end sub
|