as I can add anything to a category search
this code
' ********************************************************************
' ** flix4free
' ** Copyright (c) 2104 Hemen Kapadia
' ********************************************************************
' Displays the Movies selection screen grid
' Level 2 Screen
Sub showMoviesScreen()
dlg = CreateObject("roOneLineDialog")
dlg.setTitle("Loading Movie Collection")
dlg.showBusyAnimation()
dlg.show()
screen = CreateObject("roGridScreen")
port = CreateObject("roMessagePort")
screen.SetMessagePort(port)
screen.SetGridStyle("flat-portrait")
screen.SetDescriptionVisible(true)
screen.SetBreadcrumbText("", "Search *")
categoryList = getCategoryListMovies()
categoryCount = categoryList.count()
seriesList = CreateObject("roList")
screen.SetupLists(categoryCount)
screen.setListNames(categoryList)
for i = 0 to categoryCount-1
tmpMoviesList = getMoviesByCategory(categoryList[i])
screen.SetContentList(i,tmpMoviesList)
seriesList.AddTail(tmpMoviesList)
end for
screen.show()
timer=createobject("rotimespan")
timer.mark()
' 20 seconds = 20000
refreshTime = 10000
currentTime = 0
dlg.close()
while true
msg = wait(10, port)
currentTime = currentTime + timer.totalmilliseconds()
'print currentTime
timer.mark()
if currentTime > refreshTime then
currentTime = 0
'print "refresh"
AuthUser()
end if
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()]
showSpringboardScreenMovies(selection)
else if msg.isRemoteKeyPressed() then
if msg.GetIndex() = 10
'print "Search"
searchMovies()
end if
end if
end if
end while
End Sub
Function getCategoryListMovies() as object
jsonAsString = CreateObject("roUrlTransfer")
jsonAsString.SetURL("http://"+initConfig()+"/Dev/category.php?t=movie")
json = ParseJson(jsonAsString.GetToString())
return json
End Function
Function getMoviesByCategory(category)
jsonAsString = CreateObject("roUrlTransfer")
jsonAsString.SetURL("http://"+initConfig()+"/Dev/movie.php?cat="+category)
json = ParseJson(jsonAsString.GetToString())
return json.Videos
End Function
Our system http://www.rokumanager.com