2011-01-15, 00:18
sunny-hd Wrote:Thanks!
Klaus
One Question...
Is it possible to start a song with the new JSON API.
If yes what would be the syntax of the URL?
{ "jsonrpc": "2.0", "method": "XBMC.Play", "params": "plugin://plugin.audio.groove/some url", "id": 1 }
I had a quick look at the documentation for XBMC.play (http://wiki.xbmc.org/index.php?title=JSON_RPC#XBMC.Play) and it doesn't seem to except any parameters as you suggest above. I have never used the new JSON API so I could certainly be wrong.
It seems you could do it using Playlist.Add and then start the song using AudioPlaylist.Play. The url is "plugin://script.audio.grooveshark/?playSong=<grooveshark songid>". This is for my version of the plugin - denhams is different. Expect the url to change in the upcoming release. It might not work since I'm not sure that XBMC returns a valid handle for the python thread when called in this manner.