Thank you belltown, that was it it works
😄 I knew there had to be something simple thanks again for your help
But I have another problem maybe you can guide me through.
On the origional videoplayer example in the xml the field <genres> maps to what refers to in the Component Ref
page 51 it shows [ACTOR1] [ACTOR2][ACTOR3] on the layout but when you put in the actors name in genres in the xml they appear there. But now I have turn on all of the features associated with "movie" I now get the 4 lines of text and the rest of what I have added in the xml file such as Ratings, Releasedate, Director. but now I also get what I put in to genres in the xml in the area called [CATEGORY1][CATEGORY2] as well.
What I am looking to do is have my xml file look somthing like this . genres is in there like that now but I will remove it and use category1 2 3 if I can.
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<feed>
<!-- resultLength indicates the total number of results for this feed -->
<resultLength>4</resultLength>
<!-- endIndex indicates the number of results for this *paged* section of the feed -->
<endIndex>4</endIndex>
<item sdImg="test-image.jpg" hdImg="test-image.jpg">
<title>SABOTAGE</title>
<contentId>100133</contentId>
<contentType>movie</contentType>
<contentQuality>SD</contentQuality>
<media>
<streamFormat>mp4</streamFormat>
<streamQuality>SD</streamQuality>
<streamBitrate>1200</streamBitrate>
<streamUrl>film-location.mp4</streamUrl>
</media>
<synopsis>Description of movie</synopsis>
<genres>Sylvia Sidney Oskar Homolka Desmond Tester</genres>
<director>Alfred Hitchcock</director>
<releasedate>1936</releasedate>
<category1>Drama</category1>
<category2>Romance</category2>
<category3>Mystery</category3>
<actor1>Sylvia Sidney</actor1>
<actor2>Oskar Homolka</actor2>
<actor2>Desmond Tester</actor2>
<rating>PG</rating>
<runtime>7200</runtime>
</item>
</feed>
Then my code on showfeed.brs starting at line 52 would be
Function init_show_feed_item() As Object
o = CreateObject("roAssociativeArray")
o.ContentId = ""
o.Title = ""
o.ContentType = ""
o.ContentQuality = ""
o.Synopsis = ""
o.Genre = ""
o.ReleaseDate = ""
o.Director = ""
o.Categories = CreateObject("roArray", 10, true)
o.Categories.Push("[Category1]")
o.Categories.Push("[Category2]")
o.Categories.Push("[Category3]")
o.Actors = CreateObject("roArray", 10, true)
o.Actors.Push("[Actor1]")
o.Actors.Push("[Actor2]")
o.Actors.Push("[Actor3]")
o.Rating = ""
o.Runtime = ""
o.StreamQualities = CreateObject("roArray", 5, true)
o.StreamBitrates = CreateObject("roArray", 5, true)
o.StreamUrls = CreateObject("roArray", 5, true)
return o
End Function
then my code starting at line 140 would be
'fetch all values from the xml for the current show
item.hdImg = validstr(curShow@hdImg)
item.sdImg = validstr(curShow@sdImg)
item.ContentId = validstr(curShow.contentId.GetText())
item.Title = validstr(curShow.title.GetText())
item.Description = validstr(curShow.description.GetText())
item.ContentType = validstr(curShow.contentType.GetText())
item.ContentQuality = validstr(curShow.contentQuality.GetText())
item.Synopsis = validstr(curShow.synopsis.GetText())
item.Genre = validstr(curShow.genres.GetText())
item.Actor1 = validstr(curShow.actor1.GetText())
item.Actor2 = validstr(curShow.actor2.GetText())
item.Actor3 = validstr(curShow.actor3.GetText())
item.Director = validstr(curShow.director.GetText())
item.Category1 = validstr(curShow.category1.GetText())
item.Category2 = validstr(curShow.category2.GetText())
item.Category3 = validstr(curShow.category3.GetText())
item.ReleaseDate = validstr(curShow.releasedate.GetText())
item.Rating = validstr(curShow.rating.GetText())
item.Runtime = validstr(curShow.runtime.GetText())
item.HDBifUrl = validstr(curShow.hdBifUrl.GetText())
item.SDBifUrl = validstr(curShow.sdBifUrl.GetText())
item.StreamFormat = validstr(curShow.streamFormat.GetText())
if item.StreamFormat = "" then 'set default streamFormat to mp4 if doesn't exist in xml
item.StreamFormat = "mp4"
endif
But this code is the one I beleve is mapping the actors to genre but I am not sure how to correct it code starts on line 174
item.Length = strtoi(item.Runtime)
item.Categories = CreateObject("roArray", 5, true)
item.Categories.Push(item.Genre)
item.Actors = CreateObject("roArray", 5, true)
item.Actors.Push(item.Genre)
item.Description = item.Synopsis
If I remove this line
item.Actors.Push(item.Genre)
it removes genre from the Actors location but my setting above does not work as Actors in xml still does not display. and neither does my categories just genre. I hope this makes sence :?
thanks again for any help