I'm finally beginning to understand this language. It's certainly been tough without knowing almost anything before diving into it. Like many others I would have hired someone else if I had the budget, but I also thought this will be a fantastic skill to learn. Anyway...
I'm working with the simpleGridScreen from SDK.
I think I'm reasonably well on my way, but I've run into a bit of a snag, and seem to have a tough time finding anywhere where someone is talking about this issue:
I have all my content metadata in the script right now, but as I'm building a big channel that I plan to be updating regularly I'll need all this in xml files so that I can manipulate. I'm pretty in the dark when it comes to parsing XML files for movie metadata and posters and the likes, and need some help structuring my code right so I'm parsing correctly and the information is going where it should be in the little pop out window for each title.
Could I get away with plugging in my data into one of the xmls from the videoplayer.brs or would I need to change that?
Here's what it looks like.
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<feed>
<!-- resultLength indicates the total number of results for this feed -->
<resultLength>5</resultLength>
<!-- endIndix indicates the number of results for this *paged* section of the feed -->
<endIndex>5</endIndex>
<item sdImg="http://cs2308.mojohost.com/watchindie.info/public_html/movie%20trailers/BadReception.jpg" hdImg="http://cs2308.mojohost.com/watchindie.info/public_html/movie%20trailers/BadReception.jpg">
<title>Bad Reception</title>
<contentId>00001</contentId>
<contentType>Movie</contentType>
<contentQuality>HD</contentQuality>
<streamFormat>mp4</streamFormat>
<media>
<streamQuality>HD</streamQuality>
<streamBitrate>1500</streamBitrate>
<streamUrl>http://cs2308.mojohost.com/watchindie.info/public_html/movie%20trailers/BAD%20RECEPTION%20Trailer%201080.mp4</streamUrl>
</media>
<synopsis>A Television has a terrible reception. How will the owner fix it before the Cowboys play at 4???</synopsis>
<genres>Horror</genres>
<runtime>82</runtime>
</item>
also I want to know exactly what this operation is doing. I'm really trying to learn this so I know the language and can expand on this for channels and projects to come.
while true
print "Waiting for message"
msg = wait(0, m.port)
'msg = wait(0, screen.GetMessagePort()) ' getmessageport does not work on gridscreen
print "Got Message:";type(msg)
if type(msg) = "roGridScreenEvent" then
print "msg= "; msg.GetMessage() " , index= "; msg.GetIndex(); " data= "; msg.getData()
if msg.isListItemFocused() then
print"list item focused | current show = "; msg.GetIndex()
else if msg.isListItemSelected() then
row = msg.GetIndex()
selection = msg.getData()
print "list item selected row= "; row; " selection= "; selection
' Did we get a selection from the gridstyle selection row?
if (row = 0)
' yes, return so we can come back with new style
return StyleButtons[selection].Title
endif
'm.curShow = displayShowDetailScreen(showList[msg.GetIndex()])
else if msg.isScreenClosed() then
return ""
end if
end If
end while
if anyone can give me a hand with this that'd be much appreciated. I'll give you proper appreciation somewhere in the channel.