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

help please this roGridScreen to create

ask help to achieve ends my single channel me missing the area of the film have a json with the movie file

this json

{ "Action":[
{ Title: "Movie1 Test 1"
Description: "A Variety of Fresh Fruit"
HDPosterUrl:"pkg://images/fruit.jpg"
SDPosterUrl:"pkg://images/fruit.jpg"
Rating:"NR"
ReleaseDate:"2014"
Length: "5400"
Url: "http://dominio.com//movie.mp4"
}
{ Title: "Movie1 Test 2"
Description: "A Variety of Fresh Fruit"
HDPosterUrl:"pkg://images/fruit.jpg"
SDPosterUrl:"pkg://images/fruit.jpg"
Rating:"NR"
ReleaseDate:"2014"
Length: "5400"
Url: "http://dominio.com//movie.mp4"
}
{ Title: "Movie1 Test 3"
Description: "A Variety of Fresh Fruit"
HDPosterUrl:"pkg://images/fruit.jpg"
SDPosterUrl:"pkg://images/fruit.jpg"
Rating:"NR"
ReleaseDate:"2014"
Length: "5400"
Url: "http://dominio.com//movie.mp4"
}
]
"Comedy":[
{ Title: "Movie1 Test 1"
Description: "A Variety of Fresh Fruit"
HDPosterUrl:"pkg://images/fruit.jpg"
SDPosterUrl:"pkg://images/fruit.jpg"
Rating:"NR"
ReleaseDate:"2014"
Length: "5400"
Url: "http://dominio.com//movie.mp4"
}
{ Title: "Movie1 Test 2"
Description: "A Variety of Fresh Fruit"
HDPosterUrl:"pkg://images/fruit.jpg"
SDPosterUrl:"pkg://images/fruit.jpg"
Rating:"NR"
ReleaseDate:"2014"
Length: "5400"
Url: "http://dominio.com//movie.mp4"
}
{ Title: "Movie1 Test 3"
Description: "A Variety of Fresh Fruit"
HDPosterUrl:"pkg://images/fruit.jpg"
SDPosterUrl:"pkg://images/fruit.jpg"
Rating:"NR"
ReleaseDate:"2014"
Length: "5400"
Url: "http://dominio.com//movie.mp4"
}
]
"Documentary":[
{ Title: "Movie1 Test 1"
Description: "A Variety of Fresh Fruit"
HDPosterUrl:"pkg://images/fruit.jpg"
SDPosterUrl:"pkg://images/fruit.jpg"
Rating:"NR"
ReleaseDate:"2014"
Length: "5400"
Url: "http://dominio.com//movie.mp4"
}
{ Title: "Movie1 Test 2"
Description: "A Variety of Fresh Fruit"
HDPosterUrl:"pkg://images/fruit.jpg"
SDPosterUrl:"pkg://images/fruit.jpg"
Rating:"NR"
ReleaseDate:"2014"
Length: "5400"
Url: "http://dominio.com//movie.mp4"
}
{ Title: "Movie1 Test 3"
Description: "A Variety of Fresh Fruit"
HDPosterUrl:"pkg://images/fruit.jpg"
SDPosterUrl:"pkg://images/fruit.jpg"
Rating:"NR"
ReleaseDate:"2014"
Length: "5400"
Url: "http://dominio.com//movie.mp4"
}
]
}


that can help me I will give you thanks
Our system http://www.rokumanager.com
0 Kudos
1 REPLY 1
hugetv
Visitor

Re: help please this roGridScreen to create

Please help I have this echo but not only select works for me one film that is not select

Function CreateMovieMenu() as integer
screen = CreateObject("roGridScreen")
port = CreateObject("roMessagePort")
screen.SetMessagePort(port)
screen.SetGridStyle("four-column-flat-landscape")
screen.SetBreadcrumbText("Movie", "Full Menu")
screen.SetupLists(2)
screen.SetListNames(["Movie 1", "Movie 2"])
screen.SetContentList(0, GetMovieMenuOptions_Category_1())
screen.SetContentList(1, GetMovieMenuOptions_Category_2())

screen.show()

while (true)
msg = wait(0, port)
if type(msg) = "roGridScreenEvent"
if (msg.isScreenClosed())
return -1
' else if (msg.isListItemSelected())
' ShowMoviePlay(msg.GetData())
elseif msg.isListItemFocused()
print "Focused msg: ";msg.GetMessage();"row: ";msg.GetIndex();
print " col: ";msg.GetData()
elseif msg.isListItemSelected()
print "Selected msg: ";msg.GetMessage();"row: ";msg.GetIndex();
print " col: ";msg.GetData()
ShowMoviePlay(msg.GetIndex())
endif
endif

end while
End Function

Function GetMovieMenuOptions_Category_1() as object
m.options = [
{ Title: "Movie1 Test 1"
Description: "A Variety of Fresh Fruit"
HDPosterUrl:"pkg://images/fruit.jpg"
SDPosterUrl:"pkg://images/fruit.jpg"
Rating:"NR"
ReleaseDate:"2014"
Length: "5400"
Url: "http://dominio.com//movie.mp4"
}
{ Title: "Movie1 Test 2"
Description: "A Variety of Fresh Fruit"
HDPosterUrl:"pkg://images/fruit.jpg"
SDPosterUrl:"pkg://images/fruit.jpg"
Rating:"NR"
ReleaseDate:"2014"
Length: "5400"
Url: "http://dominio.com//movie.mp4"
}
{ Title: "Movie1 Test 3"
Description: "A Variety of Fresh Fruit"
HDPosterUrl:"pkg://images/fruit.jpg"
SDPosterUrl:"pkg://images/fruit.jpg"
Rating:"NR"
ReleaseDate:"2014"
Length: "5400"
Url: "http://dominio.com//movie.mp4"
}
]
return m.options
End Function

Function GetMovieMenuOptions_Category_2() as object
m.options = [
{ Title: "Movie2 Test 1"
Description: "A Variety of Fresh Fruit"
HDPosterUrl:"pkg://images/fruit.jpg"
SDPosterUrl:"pkg://images/fruit.jpg"
Rating:"NR"
ReleaseDate:"2014"
Length: "5400"
Url: "http://dominio.com//movie.mp4"
}
{ Title: "Movie2 Test 2"
Description: "A Variety of Fresh Fruit"
HDPosterUrl:"pkg://images/fruit.jpg"
SDPosterUrl:"pkg://images/fruit.jpg"
Rating:"NR"
ReleaseDate:"2014"
Length: "5400"
Url: "http://dominio.com//movie.mp4"
}
{ Title: "Movie2 Test 3"
Description: "A Variety of Fresh Fruit"
HDPosterUrl:"pkg://images/fruit.jpg"
SDPosterUrl:"pkg://images/fruit.jpg"
Rating:"NR"
ReleaseDate:"2014"
Length: "5400"
Url: "http://dominio.com//movie.mp4"
}
]
return m.options
End Function

Function ShowMoviePlay(index as integer) as integer
' prueba de play video
videoScreen = CreateObject("roVideoScreen")
port = CreateObject("roMessagePort")
videoScreen.SetMessagePort( port )
metaData = {
ContentType: "episode",
title: m.options[index].Title,
streamFormat: "mp4",
stream: {
Url: m.options[index].Url
}
}
videoScreen.SetContent( metaData )
videoScreen.show()

while (true)
msg = wait(0, port)
if type(msg) = "roVideoScreenEvent"
if (msg.isScreenClosed()) '<BACK>
return -1
end if
endif
end while
End Function


aver if I'm doing something wrong or I'm missing some other code
Our system http://www.rokumanager.com
0 Kudos