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

Re: XML - Categories/Levels Question

Still having problems figuring this out.

Anyone have any suggestions on how to make the categories on the Channel appear from right to left instead of left to right? It automatically goes to the left-most category when loaded....what is the fix?

Thanks in advance for the help!
Free 24/7 Metal radio via web or smartphone
www.koshermetal.com
0 Kudos
koshermetal
Visitor

Re: XML - Categories/Levels Question

"koshermetal" wrote:
Still having problems figuring this out.

Anyone have any suggestions on how to make the categories on the Channel appear from right to left instead of left to right? It automatically goes to the left-most category when loaded....what is the fix?

Thanks in advance for the help!


Scratch that....I figured it out. I'm a stupid!
Free 24/7 Metal radio via web or smartphone
www.koshermetal.com
0 Kudos
destruk
Binge Watcher

Re: XML - Categories/Levels Question

I don't think you're stupid. You figured it out, so that's great. 🙂
0 Kudos
edunn
Visitor

Re: XML - Categories/Levels Question

"joetesta" wrote:

The other day I started with a fresh SDK & went through this and confirmed that it is correct / successfully removes the leafs. The ONLY thing I left out is that you need to update your XML to include a 'feed' for the top level 'category' elements.
cheers,
Joe


I made all the changes you listed, but I'm still not able to get this to work. The app will start, but my feeds are returning blank.

It reads my categories.xml file, but isn't passing the subcategories or their video items.

Through the debugger It says

"created feed connection for url:
Request time:3
can't parse feed"

This is really stumping me. I'm thinking it could be Function get_category_names(categories As Object) As Dynamic in categoryFeed.brs since that seems to be one of the last functions that still refers to the "categories.kids", but I'm at a loss as to how to change it.

Any additional advice would be immensely appreciated.Thanks so much,
Evan
0 Kudos
RokuMarkn
Visitor

Re: XML - Categories/Levels Question

Well, one problem is you have an unescaped ampersand in the "Home & Family" string, so your XML is not well-formed. An XML validator like http://www.w3schools.com/xml/xml_validator.asp will help you find problems like this.

--Mark
0 Kudos
edunn
Visitor

Re: XML - Categories/Levels Question

Sorry, that was the browser interperation, The ampersand is escaped.

I was able to get my app to function 100% correctly when it was using leafs, so it's really not a quality-of-feed issue.

I have my root feed at categories.xml which leads to a separate feed for each category. Using the video player example, it wants to put that horizontal menu between the category listing on the splash screen and the list of episodes underneath each category. I can't get my app approved until I figure out a way to remove that extra click people have to go through to get to the episodes.
0 Kudos
edunn
Visitor

Re: XML - Categories/Levels Question

Aha! Solved.

Thanks so much for all your help!!

The problem turned out that I was applying the o.Feed = xml@feed to the wrong case in CategoryFeed.brs.

It needs to be under "if xml.GetName() = "category" then" instead of "elseif xml.GetName() = "specialCategory" then"

Of course!! Well, dunce cap me in the corner for how long that took me to figure out.

Again, whole-hearted thanks to everyone in this thread who kept me at it until I got it.
0 Kudos
agmark
Visitor

Re: XML - Categories/Levels Question

Sorry to dig up an older thread, but can anyone explain how the an XML file should look like when we include a feed for the top level category? I have a simple categories.xml and one "channels.xml" containing the <feed></feed> which contains <item>s. I assume I cut and paste this metadata into the categories file, but I don't know what the format should look like. I need to remove the unneeded leafs and simplify the UI and it sounds like Joe's edits will do that.

"joetesta" wrote:
"edunn@lifeminute.tv" wrote:
So have these modifications been successful for anyone? I tried applying them to my app, and it came up with a number of syntax errors in appHomeScreen.brs

I'd really like to get those subcategories out of there. I'm wondering if I made a mistake of my own somewhere...

Thanks so much everyone.


Hi there - see my post here: http://forums.roku.com/viewtopic.php?f=34&t=26563#p304237
The other day I started with a fresh SDK & went through this and confirmed that it is correct / successfully removes the leafs. The ONLY thing I left out is that you need to update your XML to include a 'feed' for the top level 'category' elements.
cheers,
Joe
0 Kudos
joetesta
Roku Guru

Re: XML - Categories/Levels Question

Hi agmark -

You will have an XML file for the top level categories like this:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<categories>
<category title="Category1" description="The first Category"
sd_img="http://www.##EXAMPLE##.com/images/category1_sd.png"
hd_img="http://www.##EXAMPLE##.com/images/category1_hd.png"
feed="http://www.##EXAMPLE##.com/feeds/category1.xml" >
</category>
<category title="Category2" description="The next Category"
sd_img="http://www.##EXAMPLE##.com/images/category2_sd.png"
hd_img="http://www.##EXAMPLE##.com/images/category2_hd.png"
feed="http://www.##EXAMPLE##.com/feeds/category2.xml" >
</category>
</categories>



The application should call the URL of that XML file. Then for each category listed in that file, you will have other XML files such as category1.xml, category2.xml etc and in my case those look like this:


<?xml version="1.0" encoding="UTF-8" standalone="yes"?> 
<feed>
<item sdImg="http://www.##EXAMPLE##.com/Global/images/167970.jpg" hdImg="http://www.##EXAMPLE##.com/Global/images/167970.jpg">
<title>My first Title</title>
<contentId>167970</contentId>
<ContentType>movie</ContentType>
<contentQuality>SD</contentQuality>
<streamFormat>mp4</streamFormat>
<media>
<streamQuality>SD</streamQuality>
<streamBitrate>600</streamBitrate>
<streamUrl>https://secure.##EXAMPLE##.com/167970_600.mp4</streamUrl>
</media>
<media>
<streamQuality>SD</streamQuality>
<streamBitrate>2500</streamBitrate>
<streamUrl>https://secure.##EXAMPLE##.com/167970_2500.mp4</streamUrl>
</media>
<synopsis>The first movie in my list</synopsis>
<actors>Starring: some really cool actors!</actors>
<director>Bob</director>
<releasedate>Released: 2008</releasedate>
<runtime>8500</runtime>
<hdBifUrl>http://www.##EXAMPLE##.com/167970/bif_hd.bif</hdBifUrl>
<sdBifUrl>http://www.##EXAMPLE##.com/167970/bif_sd.bif</sdBifUrl>
</item>
</feed>


I hope this helps!
-joe
aspiring
0 Kudos
radargaming
Visitor

Re: XML - Categories/Levels Question

Ok not trying to dig up an OLD thread but I have tested this on 3 new samplevideo player app and they all dont work. Can anyone confirm that this still works?
0 Kudos