XM Music Info
Does anybody know of a way to get the "Now Playing" info from the web to parse?
Besides getting a subscription and a seperate XM tuner with serial info.
The basic subscription issued with DirecTV is what is being used as the XM Source.
Not sure if it possible/legal.
Thanks
Besides getting a subscription and a seperate XM tuner with serial info.
The basic subscription issued with DirecTV is what is being used as the XM Source.
Not sure if it possible/legal.
Thanks
0
Comments
Not sure on the legality of it.
As a side note, I know it's possible to get the info for Sirius quite easily.
DATA_EVENT[dvXM2] { ONLINE: { cXM_BUFFER2 = '' CLEAR_BUFFER cXM_BUFFER2 // http://www.xmradio.com/padData/pad_provider.jsp?all_channels=true SEND_STRING dvXM2,"'GET /padData/pad_provider.jsp?all_channels=true HTTP/1.1',13,10,'Host: www.xmradio.com',13,10,13,10" WAIT_UNTIL(FIND_STRING(cXM_BUFFER2,'</paddata>',1)) IP_CLIENT_CLOSE(dvXM2.PORT) } OFFLINE: { LOCAL_VAR CHAR cTEMP_STRING[450] LOCAL_VAR CHAR cARTIST[100]; LOCAL_VAR CHAR cSONG[100] LOCAL_VAR CHAR cChannel[100]; LOCAL_VAR INTEGER nCHANNEL; IF(FIND_STRING(cXM_BUFFER2,'</paddata>',1)) { REMOVE_STRING(cXM_BUFFER2,'</authenticateduser>',1) WHILE(FIND_STRING(cXM_BUFFER2,'</event>',1)) { cTEMP_STRING = '' cTEMP_STRING = REMOVE_STRING(cXM_BUFFER2,'</event>',FIND_STRING(cXM_BUFFER2,'<event>',1)) cChannel = REMOVE_STRING(cTEMP_STRING,'</channelnumber>',FIND_STRING(cTEMP_STRING,'<channelnumber>',1)) STRING_REMOVE(cChannel,'<channelnumber>'); STRING_REMOVE(cChannel,'</channelnumber>'); nCHANNEL = ATOI(cChannel); IF(nCHANNEL <= nMAX_XM_CHAN) { cARTIST = REMOVE_STRING(cTEMP_STRING,'</artist>',FIND_STRING(cTEMP_STRING,'<artist>',1)) STRING_REMOVE(cARTIST,'<artist>'); STRING_REMOVE(cARTIST,'</artist>'); cSONG = REMOVE_STRING(cTEMP_STRING,'</songtitle>',FIND_STRING(cTEMP_STRING,'<songtitle>',1)) STRING_REMOVE(cSONG,'<songtitle>'); STRING_REMOVE(cSONG,'</songtitle>'); IF(FIND_STRING(cSONG,'&',1)) STRING_REPLACE(cSONG,'&','&'); IF(FIND_STRING(cARTIST,'&',1)) STRING_REPLACE(cARTIST,'&','&'); IF(nXM_MAP[nCHANNEL]) { XM_CHNL[nXM_MAP[nCHANNEL]].CUR_ARTIST = cARTIST; XM_CHNL[nXM_MAP[nCHANNEL]].CUR_SONG = "'"',cSONG,'"'"; } } } fnXM_UPDATE(0); cXM_BUFFER2 = '' } } }Getting information from here: http://www.xmradio.com/padData/pad_provider.jsp?all_channels=true
Example information for a channel:
Parse accordingly. Have fun!
- Chip
// specific channel
http://www.xmradio.com/padData/pad_provider.jsp?channel=7
// all channels
http://www.xmradio.com/padData/pad_provider.jsp?all_channels=true