Your Universal Remote Control Center
RemoteCentral.com
Philips Pronto Professional Forum - View Post
Up level
Up level
The following page was printed from RemoteCentral.com:

Login:
Pass:
 
 

Original thread:
Post 1 made on Sunday October 31, 2010 at 05:57
2Many
Long Time Member
Joined:
Posts:
September 2009
106
I'm trying to add some 2-way control to windows media center. I'm using an MCE plugin named VMC Controller as my connection to MCE.

Sending data to VMC Controller is no problem. Receiving data is working quite well. My problem is trying to manipulate the received data.

Below is the PS for receiving data from a VMC command named 'mediametadata'.


var httpLib = com.philips.HttpLibrary

var MetaData = httpLib.getHTTPXML("http:/192.168.2.2:40510/mediametadata", parseMeta)


function parseMeta(MetaData)
{
System.print(MetaData)
CF.widget("PS_META").label = MetaData + "\r\n"
}



(Note: I have tried the socket.read method, but had little success)

The mediametadata command returns multiple lines of data, e.g:

AlbumTitle=Ninja Tuna
TrackArtist=Mr. Scruff
Genre=Electronic
ReleaseDate=02/01/2008
Label=Ninja Tune
TrackNumber=01
TrackDuration=348
TrackTitle=Kalimba
TrackComposer=A. Carthy and A. Kingslow
Uri=C:\Users\Public\Music\Sample Music\Kalimba.mp3
AlbumArtist=Mr. Scruff
ProductionCompany=


What I am hoping to acheive is extract certain lines and place the data in separate panels, a Track Number panel, an Artist panel and so on.

This is my first 'real' attempt at using TCP/IP and HTTP and can find any snippets that may help with the data extraction.

I've looked through the dev guide, searched RC and looked at some modules for examples. I can't find a good reference, either that or I am just not getting it.


I have no HTML or XML experience to speak of. All I have is my recent PS and some very basic, Visual Basic.

The question is:

Q1 - Do I have to learn e.g. XML in order to manipulate this type of data?

Q2 - If the answer to Q1 is no, can someone point me towards a good reference that would set me on the path to enlightenment?


2Many Thanks

2Many

Last edited by 2Many on October 31, 2010 07:37.
"Home" is where my Pronto is.


Hosting Services by ipHouse