
hugetv
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-20-2017
01:37 PM
I need help to load content separately
Greetings is that I am trying to be able to make faster the entry of the section of the films I want to load the individual categories
ParseUrl.brs
GridScreen.brs
This contains all the movies
itemAA=m.parsegrid.content
ParseUrl.brs
Function GetDataCategory()
http = NewHttp(m.top.uri)
source = http.GetToStringWithRetry()
responseJSON = ParseJSON(source)
RowItems=createObject("RoSGNode","ContentNode")
For x=0 To numofcategories
row=createObject("RoSGNode","ContentNode")
row.Id=responseJSON[x].Id
row.Title=responseJSON[x].Title
RowItems.AppendChild(row) 'Add each individual category of items
Next
m.top.content=RowItems 'set top content field to the entire screen's content which will cause the content observer to notice
End Function
Function GetDataMovies()
readInternet=createObject("roUrlTransfer")
readInternet.setUrl(m.top.uri)
source=readInternet.GetToString()
responseJSON = ParseJSON(source)
RowItems=createObject("RoSGNode","ContentNode")
numofitems=responseJSON.Count()-1
For c=0 To numofitems
item=createObject("RoSGNode","ContentNode")
item.Title=responseJSON[c].Title
item.ContentType=responseJSON[c].ContentType
item.ContentId=responseJSON[c].MoviesId
item.Id=responseJSON[c].MoviesId
item.description=responseJSON[c].description
item.url=responseJSON[c].StreamUrls
item.Rating=responseJSON[c].Rating
item.SubtitleUrl=responseJSON[c].SubtitleUrl
item.Length=responseJSON[c].Length
item.streamFormat=responseJSON[c].StreamFormat
item.releasedate=responseJSON[c].ReleaseDate
item.HDPosterURL=m.app.poster + responseJSON[c].HDPosterURL
item.hdbackgroundimageurl=responseJSON[c].hdbackgroundimageurl
RowItems.AppendChild(item) 'Add each individual category of items
Next
m.top.content=RowItems 'set top content field to the entire screen's content which will cause the content observer to notice
End Function
GridScreen.brs
' ********** Copyright 2016 Roku Corp. All Rights Reserved. **********
'inits grid screen
'creates all children
'sets all observers
Function Init()
Print"[GridScreen] Init"
m.rowList=m.top.findNode("RowList")
m.description=m.top.findNode("Description")
m.background=m.top.findNode("Background")
m.top.observeField("visible","onVisibleChange")
m.top.observeField("focusedChild","OnFocusedChildChange")
m.ParseGrid=m.top.findnode("ParseUrl")
End Function
'handler of focused item in RowList
Sub OnItemFocused()
itemFocused=m.top.itemFocused
m.ParseGrid.uri="movies_items.php?cve="+m.top.content.getChild(itemFocused[0]).Id
m.ParseGrid.FunctionName="GetDataMovies"
m.parsegrid.observefield("content","Moviescontent")
m.ParseGrid.control="RUN"
itemAA=m.parsegrid.content
If itemFocused.Count()=2
focusedContent=m.parsegrid.content
If focusedContent<>invalid
print m.top.content.getChild(itemFocused[0]).getChild(itemFocused[1])
m.top.focusedContent=m.top.content.getChild(itemFocused[0]).getChild(itemFocused[1])
m.description.content=focusedContent
m.background.uri=focusedContent.hdBackgroundImageUrl
End If
End If
End Sub
'set proper focus to RowList in case if return from Details Screen
Sub onVisibleChange()
If m.top.visible=TRUE
m.rowList.setFocus(TRUE)
End If
End Sub
'set proper focus to RowList in case if return from Details Screen
Sub OnFocusedChildChange()
If m.top.isInFocusChain() And Not m.rowList.hasFocus()
m.rowList.setFocus(TRUE)
End If
End Sub
This contains all the movies
itemAA=m.parsegrid.content
Our system http://www.rokumanager.com
5 REPLIES 5

hugetv
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-23-2017
04:42 AM
Re: I need help to load content separately
Someone will have some idea or some help
Our system http://www.rokumanager.com
xoceunder
Roku Guru
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-23-2017
10:44 AM
Re: I need help to load content separately
I would like that solution I have the same problem

hugetv
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-30-2017
09:08 AM
Re: I need help to load content separately
Could someone help me with this please
Our system http://www.rokumanager.com
abelvaldez
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-03-2017
04:20 PM
Re: I need help to load content separately
I have the same proble. please help
xoceunder
Roku Guru
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-07-2022
06:28 PM
Re: I need help to load content separately
they were able to find the solution