I can help to load the covers as fast as 1,000 movies surpasses the content is put slow loading
Sub showMoviesScreen()
dlg = CreateObject("roOneLineDialog")
dlg.setTitle("Loading Collection")
dlg.showBusyAnimation()
dlg.show()
screen = CreateObject("roGridScreen")
port = CreateObject("roMessagePort")
screen.SetMessagePort(port)
screen.SetGridStyle("flat-portrait")
screen.SetDescriptionVisible(true)
screen.SetBreadcrumbText("Movies", "Session")
categoryList = getCategoryListMovies()
categoryCount = categoryList.count()
seriesList = CreateObject("roList")
screen.SetupLists(categoryCount)
screen.show()
screen.setListNames(categoryList)
for i = 0 to categoryCount-1
tmpMoviesList = getMoviesByCategory(categoryList[i])
screen.SetContentList(i,tmpMoviesList)
seriesList.AddTail(tmpMoviesList)
screen.show()
end for
screen.show()
dlg.close()
while true
msg = wait(0, port)
if msg <> invalid and type(msg) = "roGridScreenEvent" then
if msg.isScreenClosed() then
exit while
else if msg.isListItemFocused()
print "Focused msg: ";msg.GetMessage();"row: ";msg.GetIndex();
print " col: ";msg.GetData()
else if msg.isListItemSelected() then
print "Selected msg: ";msg.GetMessage();"row: ";msg.GetIndex();
'selection = seriesList.GetEntry(msg.GetIndex())[msg.GetData()]
list = seriesList.GetEntry(msg.GetIndex())
if list <> invalid then
selection = list[msg.GetData()]
end if
if selection.Title = "Search"
searchMovies()
else if selection.Title = "Favorites"
FavoritesMovies()
else
showSpringboardScreenMovies(selection)
end if
end if
end if
end while
End Sub
Function getCategoryListMovies() as object
jsonAsString = CreateObject("roUrlTransfer")
jsonAsString.SetURL(UrlServidor()+"/category.php?t=movies")
json = ParseJson(jsonAsString.GetToString())
return json
End Function
Function getMoviesByCategory(category)
jsonAsString = CreateObject("roUrlTransfer")
jsonAsString.SetURL(UrlServidor()+"/movies.php?cat="+category)
json = ParseJson(jsonAsString.GetToString())
return json.Videos
End Function
Our system http://www.rokumanager.com