Roku Developer Program

Join our online forum to talk to Roku developers and fellow channel creators. Ask questions, share tips with the community, and find helpful resources.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
hugetv
Visitor

problem displaying content

problem displaying content

' ********************************************************************
' ** flix4free
' ** Copyright (c) 2104 Hemen Kapadia
' ********************************************************************
' Displays the TV series selection screen grid
' Level 2 Screen

Sub showTVSeriesScreen()
screen = CreateObject("roGridScreen")
port = CreateObject("roMessagePort")
screen.SetMessagePort(port)
screen.SetGridStyle("flat-portrait")
screen.SetDescriptionVisible(true)


categoryList = getCategoryList()
categoryCount = categoryList.count()

seriesList = CreateObject("roList")

screen.SetupLists(categoryCount)
screen.setListNames(categoryList)


for i = 0 to categoryCount-1
tmpSeriesList = getSeriesByCategory(categoryList[i])
screen.SetContentList(i,tmpSeriesList)
seriesList.AddTail(tmpSeriesList)
end for

screen.show()

while true
msg = wait(0, port)
if msg <> invalid and type(msg) = "roGridScreenEvent" then
if msg.isScreenClosed() then
exit while
else if msg.isListItemSelected() then
selection = seriesList.GetEntry(msg.GetIndex())[msg.GetData()]
showSpringboardScreen(selection)
end if
end if
end while

End Sub



Function getCategoryList() as object
contentList = [ "Action","Comedy" ]
return contentList
End Function

Function getSeriesByCategory(category as string) as Object
print category
jsonAsString = CreateObject("roUrlTransfer")
jsonAsString.SetURL("http://62.108.40.131/movie.json")
json = ParseJson(jsonAsString.GetToString())

return json.category


End Function
Our system http://www.rokumanager.com
0 Kudos
1 REPLY 1
hugetv
Visitor

Re: problem displaying content

as to solve the problem
Our system http://www.rokumanager.com
0 Kudos
Need Assistance?
Welcome to the Roku Community! Feel free to search our Community for answers or post your question to get help.

Become a Roku Streaming Expert!

Share your expertise, help fellow streamers, and unlock exclusive rewards as part of the Roku Community. Learn more.