Your Digital Media Has Never Looked So Good

 
journeyman73
Topic Author
Posts: 6
Joined: Wed Oct 19, 2011 3:30 am

star rating & runtime

Thu Nov 03, 2011 7:11 am

Hi,
i'm tweaking the videoplayer example and I have come across a little problem.
I want to remove the ratings stars from the details screen and also the running time
Also when I remove one of the buttons to play it breaks
how can i do these things
Cheers
Kevin
 
journeyman73
Topic Author
Posts: 6
Joined: Wed Oct 19, 2011 3:30 am

Re: star rating & runtime

Thu Nov 03, 2011 8:15 am

Hi, just an update.
I've sorted the button issue but i have another question.
in the xml I want to use a live stream, are there settings i need for it?
Kev
 
journeyman73
Topic Author
Posts: 6
Joined: Wed Oct 19, 2011 3:30 am

Re: star rating & runtime

Wed Nov 09, 2011 9:30 am

anybody have any ideas????
Kevin
 
destruk
Posts: 2720
Joined: Sat Dec 18, 2010 4:58 pm

Re: star rating & runtime

Wed Nov 09, 2011 12:48 pm

From the simpleVideoPlayer example with a live stream, the xml has

' Big Buck Bunny test stream from Wowza
'urls = ["http://ec2-174-129-153-104.compute-1.amazonaws.com:1935/vod/smil:BigBuckBunny.smil/playlist.m3u8"]
'qualities = ["SD"]
'streamformat = "hls"
'title = "Big Buck Bunny"

I don't know if 'qualities' is required or not.
 
journeyman73
Topic Author
Posts: 6
Joined: Wed Oct 19, 2011 3:30 am

Re: star rating & runtime

Thu Nov 10, 2011 2:45 am

yea the xml does not have those qualities in there but the icons still appear on the video details page
Cheers
 
bandal
Posts: 260
Joined: Sat Oct 15, 2011 2:17 pm

Re: star rating & runtime

Mon Nov 14, 2011 3:14 pm

I am also looking for a way to remove the stars in the videoplayer example. I removed the color, but the graphical stars I have not found yet. Must be a static variable somewhere. Let us know what is found if we don't find it in the videoplayer example code.

Update: I added this line in Bold in the videoplayer example to remove the stars in the appDetailScreen.brs file:

screen.ClearButtons()
screen.AddButton(1, "Resume Playing")
screen.AddButton(2, "Play from Beginning")
'Remove stars from screen
screen.SetStaticRatingEnabled(false)
screen.SetContent(show)
screen.Show()

DA
 
creator
Posts: 21
Joined: Wed Jul 20, 2011 5:08 pm

Re: star rating & runtime

Tue Jan 31, 2012 6:03 pm

Thanks to Bandal for the answer on how to remove the star ratings. I also could not find anything to take out of the code to make the stars go away. Does anybody know how to take the runtime info out also. I am trying to do this also. I added a little square to the end of the code Bandal gave us and it worked for me. I guess the square is like a period in a sentance of code.
 
creator
Posts: 21
Joined: Wed Jul 20, 2011 5:08 pm

Re: star rating & runtime

Tue Jan 31, 2012 6:31 pm

The time is in sec in the xml. It is <runtime>sec</runtime>. 1hr 10 min = 4200 sec for it to display 1hr 10 min. I tried to take the runtime code out but it just displayed 0 for the run time. Does anybody know what I can do to not display zero run time. I don't want to display any runtime.
 
User avatar
RokuChris
Posts: 1166
Joined: Mon Aug 30, 2010 1:45 pm

Re: star rating & runtime

Tue Jan 31, 2012 6:59 pm

creator wrote:
The time is in sec in the xml. It is <runtime>sec</runtime>. 1hr 10 min = 4200 sec for it to display 1hr 10 min. I tried to take the runtime code out but it just displayed 0 for the run time. Does anybody know what I can do to not display zero run time. I don't want to display any runtime.


To not display the runtime, the length attribute of your content-meta-data structure needs to be invalid. If I recall correctly, the parsing logic in the sample converts an empty string to zero. So you'd need to modify that part of the code and remove the line that assigns the value of the length attribute.
 
User avatar
RokuJoel
Posts: 1758
Joined: Mon Nov 14, 2011 5:22 pm

Re: star rating & runtime

Tue Jan 31, 2012 7:03 pm

I think if you comment-out, or remove this line:

item.Runtime = validstr(curShow.runtime.GetText())

and this line:

item.Length = strtoi(item.Runtime)

in function parse_show_feed, which is in showFeed.brs, that will remove it.

(to comment a line out, so that it no longer does anything, just put a single-quote mark in front of it like this):

'this line is just a comment


- Joel
 
bandal
Posts: 260
Joined: Sat Oct 15, 2011 2:17 pm

Re: star rating & runtime

Tue Jan 31, 2012 7:14 pm

In your xml file you may want to just remove this line. <runtime></runtime> It will not show 0, just nothing shows on screen. If you remove or comment out the section of code that controls this, it applies to all shows.
Only because you may have other video in your xml file that you want to insert the length.

Update on the stars if using 4.1 SDK videoplayer. To keep the stars away for good after watching a show and the Resume button shows with stars here is the code that includes 2 statements to remove stars:
screen.ClearButtons()
if regread(show.contentid) <> invalid and regread(show.contentid).toint() >=30 then
screen.AddButton(1, "Resume Playing")
screen.AddButton(2, "Play from Beginning")
screen.SetStaticRatingEnabled(false)
else
screen.addbutton(2,"Play")
screen.SetStaticRatingEnabled(false)
end if
screen.SetContent(show)
screen.Show()
 
creator
Posts: 21
Joined: Wed Jul 20, 2011 5:08 pm

Re: star rating & runtime

Wed Feb 01, 2012 3:55 pm

RokuJoel wrote:
I think if you comment-out, or remove this line:

item.Runtime = validstr(curShow.runtime.GetText())

and this line:

item.Length = strtoi(item.Runtime)

in function parse_show_feed, which is in showFeed.brs, that will remove it.

(to comment a line out, so that it no longer does anything, just put a single-quote mark in front of it like this):

'this line is just a comment


- Joel


I did what you suggested and it removed all of the runtimes and this was what I wanted to do. Thanks for the help with the code again. This forum is very helpful to someone like me who doesn't know much about the code.

Who is online

Users browsing this forum: No registered users and 2 guests