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

Dealing with multiple enclosures in a feed

I am dealing with a feed that all of a sudden has multiple enclosures for some content and the code can't deal with it. Here is the current code. How can I grab just a single enclosure? I actually don't need all of them (they are the same), just one.

else if item.enclosure.Count() > 0
print item.enclosure@url
newStream = {
url: ValidStr(item.enclosure@url)
}
newItem.streams.Push(newStream)
result.Push(newItem)
end if


Thanks!
0 Kudos
1 REPLY 1
RokuKevin
Visitor

Re: Dealing with multiple enclosures in a feed

Try: item.enclosure[0]@url

--Kevin
0 Kudos