I'm working on an open source HTML5 app for Crestron control systems using xbmc as a source which has a pandora plugin (shameless plug) @ https://github.com/SinnerDC2/CrestJson/ .
I'm currently extremely happy with the progress. The device can play/stop, get status time/total time, and skip. The only problem I have is that I cant get a list of the pandora channels so I can switch channels. I'm not sure where to starts on this task since
{"jsonrpc": "2.0", "id": 1, "method": "Playlist.GetPlaylists"} nor did
{"jsonrpc": "2.0", "method": "Playlist.GetItems", "params": { "properties": ["title", "album", "artist", "duration"], "playlistid": 0 }, "id": 1}
Please any direction would be appreciated! I just wish jsonp was support, it would make my life easier for cross domain calls instead of my proxy.
here is the code in python from the plugin i think
I also found this
http://wiki.xbmc.org/index.php?title=HOW...ON-RPC_API
but i was not able to get it to execute.
Thanks
Nick
I'm currently extremely happy with the progress. The device can play/stop, get status time/total time, and skip. The only problem I have is that I cant get a list of the pandora channels so I can switch channels. I'm not sure where to starts on this task since
{"jsonrpc": "2.0", "id": 1, "method": "Playlist.GetPlaylists"} nor did
{"jsonrpc": "2.0", "method": "Playlist.GetItems", "params": { "properties": ["title", "album", "artist", "duration"], "playlistid": 0 }, "id": 1}
Please any direction would be appreciated! I just wish jsonp was support, it would make my life easier for cross domain calls instead of my proxy.
here is the code in python from the plugin i think
Code:
def GetStationList(self):
# After successful login, try to get the station list for the user
method = "user.getStationList"
Url = self.ConstructURL(method)
postDict = {}
self.AppendPostData(postDict)
postData = json.dumps(postDict)
encPostData = self.partner.out.encrypt(postData)
responseData = JsonGetURL(Url, encPostData, self.opener)
if not self.ValidateResponse(responseData):
return []
responseJson = json.loads(responseData)
result = responseJson["result"]
stations = result["stations"]
for station in stations:
tmpStation = PianoStation()
tmpStation.name = station["stationName"]
tmpStation.id = station["stationToken"]
tmpStation.isCreator = not bool(station["isShared"])
tmpStation.isQuickMix = bool(station["isQuickMix"])
self.stations.append(tmpStation)
return self.stations
I also found this
http://wiki.xbmc.org/index.php?title=HOW...ON-RPC_API
but i was not able to get it to execute.
Thanks
Nick