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: 
dynamitemedia
Binge Watcher

search in category feed

I am using the video player example. so i am getting my categories from a xml feed off my website

what i want to do is add in the category feed that comes back a search as one of the categories.

I have been able to get the cosmetic look of it, but when you click on search it doesn't bring up the Roku's search

how have others done this? i remember reading you can add special categories, is that how some have done this?

I can add the search as a button on the welcome page and do a search but i want to add it in the category feed to get the feel like the youtube or eztakes feel to it.

Thanks
Twitter: iptvmyway facebook: iptvmyay
Channels: Warriors of War, Go Fight Live, Heading Outdoorz, IPTVmyway
0 Kudos
21 REPLIES 21
TheEndless
Channel Surfer

Re: search in category feed

Search isn't automatic. You have to implement it yourself. I posted this awhile back to make the UI part a bit easier: viewtopic.php?f=34&t=32518&p=202516#p202518
You'll still have to write the actual search and results code.
My Channels: http://roku.permanence.com - Twitter: @TheEndlessDev
Instant Watch Browser (NetflixIWB), Aquarium Screensaver (AQUARIUM), Clever Clocks Screensaver (CLEVERCLOCKS), iTunes Podcasts (ITPC), My Channels (MYCHANNELS)
0 Kudos
dynamitemedia
Binge Watcher

Re: search in category feed

Yes i know you have to implement it.

where do i put that code in the appPosterScreen? is there a section i should put it in? i found that taking snipplets of code can cause hours of grief if not put in the correct spot and so this time i am asking where it should go.

also that thread doesn't help me understand how that is added in the category tree or how to add it to the categories? I want to do it like the youtube and have a search image and when you click on that it takes you to the search from inside Roku.

I am sorry i guess i need it dummified cause i am just not following
Twitter: iptvmyway facebook: iptvmyay
Channels: Warriors of War, Go Fight Live, Heading Outdoorz, IPTVmyway
0 Kudos
dynamitemedia
Binge Watcher

Re: search in category feed

also when i say i got the cosmetic look what i did was added the search category leaf in my xml.

because i am using the video player example, it seems the only way i could add any "special" categories such a s search etc was via that feed.

could i place a showscreen() in that section of displaySpecialCategoryScreen ?
Twitter: iptvmyway facebook: iptvmyay
Channels: Warriors of War, Go Fight Live, Heading Outdoorz, IPTVmyway
0 Kudos
TheEndless
Channel Surfer

Re: search in category feed

I'm pretty sure the YouTube channel doesn't use RSS feeds, so the search option would be added programmatically there, too. The code I posted is a complete implementation that's meant to be included as another file in your project. What you would do is add the "search = NewSearchWindow()" part to your IsListItemSelected event in your poster screen wait loop, within a check for the selected item being your Search item.
My Channels: http://roku.permanence.com - Twitter: @TheEndlessDev
Instant Watch Browser (NetflixIWB), Aquarium Screensaver (AQUARIUM), Clever Clocks Screensaver (CLEVERCLOCKS), iTunes Podcasts (ITPC), My Channels (MYCHANNELS)
0 Kudos
dynamitemedia
Binge Watcher

Re: search in category feed

Endless first off as always thanks for your help.. with that said i am still very confused....

I am using the video player example, I cant change that. with that being said.

lets try and do one thing at a time because its confusing me more.

in the video player example, How would i pro grammatically add the search function in the poster screen with image and all
Twitter: iptvmyway facebook: iptvmyay
Channels: Warriors of War, Go Fight Live, Heading Outdoorz, IPTVmyway
0 Kudos
TheEndless
Channel Surfer

Re: search in category feed

"dynamitemedia" wrote:
I am using the video player example, I cant change that. with that being said.

Why can't you change that? You certainly should be able to modify it and add files to it... ? Or do you mean, it's too late in the game to change the base code for your channel?

"dynamitemedia" wrote:
in the video player example, How would i pro grammatically add the search function in the poster screen with image and all

In getShowsForCategoryItem, you could add a new item to the end of the showList that "conn.LoadShowFeed()" returns...

showList = conn.LoadShowFeed(conn)
showList.Push( { ShortDescriptionLine1: "Search", HDPosterUrl: "pkg:/images/mysearchhd.png", SDPosterUrl: "pkg:/images/mysearchsd.png" })

And then, in showPosterScreen, add an "if" to the "msg.isListItemSelected()" section that checks if the selected item is your custom search item or one of the feed items. If it's the search item, then you'd call your search code.
My Channels: http://roku.permanence.com - Twitter: @TheEndlessDev
Instant Watch Browser (NetflixIWB), Aquarium Screensaver (AQUARIUM), Clever Clocks Screensaver (CLEVERCLOCKS), iTunes Podcasts (ITPC), My Channels (MYCHANNELS)
0 Kudos
dynamitemedia
Binge Watcher

Re: search in category feed

Endless did you test that? first i am trying to just add the search icon to the category list then will try to get the "if" statement your talking about.

this is the error i get

BrightScript Debugger> *** ERROR compiling /pkg:/source/appPosterScreen.brs:
line 174, error code &h02: Syntax Error


Function getShowsForCategoryItem(category As Object, item As Integer) As Object

if validateParam(category, "roAssociativeArray", "getCategoryList") = false return invalid

conn = InitShowFeedConnection(category.kids[item])
showList = conn.LoadShowFeed(conn)
174 -- showList.Push( { ShortDescriptionLine1: "Search", HDPosterUrl: showList.Push( { ShortDescriptionLine1: "Search", HDPosterUrl: "pkg:/images/search.png", SDPosterUrl: "pkg:/images/search.png" })

return showList
End Function


I have tried adding the whole code you sent at the end or before of this : return showList and i get errors too

so again im running into snipplets and where they belong 😞
Twitter: iptvmyway facebook: iptvmyay
Channels: Warriors of War, Go Fight Live, Heading Outdoorz, IPTVmyway
0 Kudos
TheEndless
Channel Surfer

Re: search in category feed

No, I didn't test it. I typed it directly into the forum post, but it looks like you double-pasted after the HDPosterUrl...
My Channels: http://roku.permanence.com - Twitter: @TheEndlessDev
Instant Watch Browser (NetflixIWB), Aquarium Screensaver (AQUARIUM), Clever Clocks Screensaver (CLEVERCLOCKS), iTunes Podcasts (ITPC), My Channels (MYCHANNELS)
0 Kudos
TheEndless
Channel Surfer

Re: search in category feed

Ok, I just tested it, and it works without a syntax error, so it's definitely something you introduced in your copy/paste. That being said, this adds a search item to the appPosterScreen, not the appHomeScreen, which I think is what you actually want to do. If that's the case, then you'd need to add it to the initCategoryList function in appHomeScreen.brs...

Function initCategoryList() As Void

conn = InitCategoryFeedConnection()

m.Categories = conn.LoadCategoryFeed(conn)
m.Categories.Kids.Push({ Type: "search", ShortDescriptionLine1: "Search", HDPosterUrl: "pkg:/images/mysearchhd.png", SDPosterUrl: "pkg:/images/mysearchsd.png" })
m.CategoryNames = conn.GetCategoryNames(m.Categories)

End Function

And then add a new condition to the showHomeScreen wait loop:
                if kid.type = "search" then
print "Search"
else if kid.type = "special_category" then
My Channels: http://roku.permanence.com - Twitter: @TheEndlessDev
Instant Watch Browser (NetflixIWB), Aquarium Screensaver (AQUARIUM), Clever Clocks Screensaver (CLEVERCLOCKS), iTunes Podcasts (ITPC), My Channels (MYCHANNELS)
0 Kudos