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: 
trphelan
Visitor

Length won't show on roSpringboardScreen

I can't get the "Length" field to show up on a roSpringboardScreen. I set .Length to a positive number, set .ContentType to "episode" and do a SetDescriptionStyle("video") or SetDescriptionStyle("movie"), and the video length isn't displayed.

If I recall correctly I've also tried setting release date and rating, and those fields don't get displayed either. I am able to control the display of the star rating with SetStaticRatingEnabled.

Anyone have any idea what I'm missing?

Tom P.
0 Kudos
5 REPLIES 5
RokuKevin
Visitor

Re: Length won't show on roSpringboardScreen

The "Length" content meta-data parameter will display on both "video" and "movie" description style poster screens. Please check that the value of your "Length" parameter is an integer in seconds. The screen takes care of displaying in hour/min format, but you need to supply the Length parameter as an Integer in seconds.

Release Date and rating only display on the "movie" description style, they do not display on the "video" description style.

--Kevin
0 Kudos
trphelan
Visitor

Re: Length won't show on roSpringboardScreen

Thanks for the response. I am setting the Length to an integer, but still don't see it displayed. Here's the code that sets the value:

tmp = item.length.GetText() 'this is from an xml object
i.Length = tmp.ToInt() 'i is the roAssociativeArray passed to SetContent

I was setting i.Length directly from GetText(), and acting on what was said I changed it to be explicit about making an integer, but it didn't change things.

Tom P.
0 Kudos
RokuKevin
Visitor

Re: Length won't show on roSpringboardScreen

try to "print i.Length" and see that it is the value you expect. If i.Length = 3600, it would display as "1h".

--Kevin
0 Kudos
trphelan
Visitor

Re: Length won't show on roSpringboardScreen

Yes, "print i.Length" prints the expected value.

Tom P.
0 Kudos
nowhereman
Visitor

Re: Length won't show on roSpringboardScreen

Just a crazy, random thought. This may not be your problem at all, but it did confuse me a bit when I was first learning this stuff.

If you are working from the videoplayer example, and you are setting the Length attribute in showFeed.brs, it might be getting overwritten in appDetailScreen.brs. There is a line in appDetailScreen.brs (line 98 of the unmodified example code) that overwrites the Length attribute with the contents of the Runtime attribute. So, if the Runtime attribute is empty, that might explain your Length attribute not showing up.
twitter:nowhereman
http://www.thenowhereman.com/roku
http://www.thenowhereman.com/netflix
0 Kudos