jf-roku/components/music/MusicArtistDetails.brs

43 lines
898 B
Plaintext
Raw Normal View History

2022-05-14 02:35:50 +00:00
sub init()
m.top.optionsAvailable = false
2022-05-21 20:45:01 +00:00
setupMainNode()
end sub
sub setupMainNode()
2022-05-14 02:35:50 +00:00
main = m.top.findNode("toplevel")
main.translation = [96, 175]
end sub
2022-05-21 20:45:01 +00:00
' Event fired when page data is loaded
sub pageContentChanged()
item = m.top.pageContent
2022-05-14 02:35:50 +00:00
2022-05-14 21:14:15 +00:00
' Populate scene data
2022-05-21 20:45:01 +00:00
setScreenTitle(item.json)
setPosterImage(item.posterURL)
setOnScreenTextValues(item.json)
2022-05-14 02:35:50 +00:00
end sub
2022-05-21 20:45:01 +00:00
sub setScreenTitle(json)
if isValid(json)
m.top.overhangTitle = json.name
end if
end sub
2022-05-14 02:35:50 +00:00
2022-05-21 20:45:01 +00:00
sub setPosterImage(posterURL)
if isValid(posterURL)
m.top.findNode("artistImage").uri = posterURL
2022-05-14 02:35:50 +00:00
end if
2022-05-21 20:45:01 +00:00
end sub
2022-05-14 02:35:50 +00:00
2022-05-21 20:45:01 +00:00
' Populate on screen text variables
sub setOnScreenTextValues(json)
if isValid(json)
setFieldTextValue("overview", json.overview)
end if
2022-05-14 02:35:50 +00:00
end sub
function onKeyEvent(key as string, press as boolean) as boolean
return false
end function