jeremyk
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-27-2012
01:58 PM
Videoplayer sample app with only one category of content?
Does anyone have any guidance on basically removing the category functionality from the sample video player app? So you load the channel and its just straight to the video listing? Basically it might look like MRSS, but not based on some RSS feed out there. You see, I will be adding categorization in the future as new content becomes available, but to start there is only one category and seems silly to just have the one there (extra action from the user). I would rather not rip it all out and would rather trick it into moving straight to a particular categories listing, then can always add it back later.
Thanks for any help.
Thanks for any help.
5 REPLIES 5

RokuJoel
Binge Watcher
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-27-2012
02:12 PM
Re: Videoplayer sample app with only one category of content
I believe this code is in Videoplayer in the current 4.1 release of the SDK, note the part starting with "temp=getcategorylist"
Function showPosterScreen(screen As Object, category As Object) As Integer
if validateParam(screen, "roPosterScreen", "showPosterScreen") = false return -1
if validateParam(category, "roAssociativeArray", "showPosterScreen") = false return -1
m.curCategory = 0
m.curShow = 0
temp=getcategorylist(category)
if temp.count() > 1 then
screen.SetListNames(temp)
?temp.count();" categories"
else
?"only ";temp.count();" category"
end if
screen.SetContentList(getShowsForCategoryItem(category, m.curCategory))
screen.Show()
while true
jeremyk
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-27-2012
02:16 PM
Re: Videoplayer sample app with only one category of content
Great, I will get the latest and check it out. Thanks!
jeremyk
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-27-2012
03:08 PM
Re: Videoplayer sample app with only one category of content
So I tried this out generically just to see what would happen and the sample code seems to crash if you only have one category. First it does show the category screen and then if you select the category screen, it immediately throws errors in the debugger.

RokuJoel
Binge Watcher
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-27-2012
03:41 PM
Re: Videoplayer sample app with only one category of content
it's a code excerpt, the code that matters is
Post your crash details.
- Joel
temp=getcategorylist(category)
if temp.count() > 1 then
screen.SetListNames(temp)
?temp.count();" categories"
else
?"only ";temp.count();" category"
end if
Post your crash details.
- Joel
jeremyk
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-27-2012
03:58 PM
Re: Videoplayer sample app with only one category of content
Yeah, I think understand the code. That being said, if I am not mistaken isn't this on the wrong screen to bypass the Category page? Shouldn't we actually be implementing similar code on appHomeScreen.brs? This was the area I was expecting to add code. Prior to screen.Show() being called...
Maybe I am not understanding the flow properly, but isn't appPosterScreen showing the videos FROM a selected category so that code doesn't even fire until a category is selected? I am trying to skip the category selection page and jump right to the associated videos for a category.
Function showHomeScreen(screen) As Integer
if validateParam(screen, "roPosterScreen", "showHomeScreen") = false return -1
initCategoryList()
screen.SetContentList(m.Categories.Kids)
screen.SetFocusedListItem(3)
screen.Show()
Maybe I am not understanding the flow properly, but isn't appPosterScreen showing the videos FROM a selected category so that code doesn't even fire until a category is selected? I am trying to skip the category selection page and jump right to the associated videos for a category.