Thanks for your help, i need help with the head request code, in rbightscript, how would do a head request cto change the content type ?
Also for unknown reason line # 142 function call for validstr(curShow.streamFormat.GetText()) always returns empty value. I do have a value for the streamFormat in my xml ( see listed below code snipet from creativity). but if i manually set to one type e.g. hls or mp4 then it works for me but i want dynamic setting not hardcoding. your help is really appreciated. thanks in advance.
inside the showfeed.brs file, line #142
'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.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
END OF SAMPLE CODE
Creativity.xml
Creativity.xml CODE:
<item sdImg="
http://rokudev.roku.com/rokudev/examples/videoplayer/images/ElizabethGilbert.jpg" hdImg="
http://rokudev.roku.com/rokudev/examples/videoplayer/images/ElizabethGilbert.jpg">
<title>Elizabeth Gilbert on nurturing creativity</title>
<contentId>10051</contentId>
<contentType>Talk</contentType>
<contentQuality>SD</contentQuality>
<streamFormat>hls</streamFormat>
<media>
<streamQuality>SD</streamQuality>
<streamBitrate>1500</streamBitrate>
<streamUrl>
http://video.ted.com/talks/podcast/ElizabethGilbert_2009_480.m3u8</streamUrl>
</media>
<synopsis>Elizabeth Gilbert</synopsis>
<genres>Creativity</genres>
<runtime>1172</runtime>
</item>
<item sdImg="
http://rokudev.roku.com/rokudev/examples/videoplayer/images/SethGodin.jpg" hdImg="
http://rokudev.roku.com/rokudev/examples/videoplayer/images/SethGodin.jpg">
<title>Seth Godin on standing out</title>
<contentId>10052</contentId>
<contentType>Talk</contentType>
<contentQuality>SD</contentQuality>
<streamFormat>mp4</streamFormat>
<media>
<streamQuality>SD</streamQuality>
<streamBitrate>1500</streamBitrate>
<streamUrl>
http://video.ted.com/talks/podcast/SethGodin_2003_480.mp4</streamUrl>
</media>
<synopsis>In a world</synopsis>
<genres>Creativity</genres>
<runtime>1024</runtime>
</item>