JSON-RPC does not support PVR yet so it's not really a bug it just isn't supported.
Nonetheless what do you mean by "Can't use it"? Do none of the commands work? What error do you get?
JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC
Montellese
Team-XBMC Developer Joined: Jan 2009 Reputation: 20 Location: Switzerland |
2012-02-29 10:39
Post: #1771
Always read the XBMC online-manual, FAQ and search the forum before posting. Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules. For troubleshooting and bug reporting please make sure you read this first. ![]() |
| find quote |
yallah
Senior Member Joined: May 2011 Reputation: 0 Location: Cannes, France |
2012-02-29 11:53
Post: #1772
Montellese Wrote:JSON-RPC does not support PVR yet so it's not really a bug it just isn't supported. by exemple, if i use PVR.ChannelSwitch method when pvr video is in full screen the channel can change. but if pvr video is in window inside xbmc's home page or in pvr page i can't change channel with PVR.ChannelSwitch. And information is not received in xbmc because i can't get any log when json command doesn't work. |
| find quote |
Montellese
Team-XBMC Developer Joined: Jan 2009 Reputation: 20 Location: Switzerland |
2012-02-29 12:44
Post: #1773
Ah these PVR specific methods are not from me and I don't have them in my code because I don't use PVR yet. You might wanna contact FSSDawid which implemented the JSON-RPC extensions for PVR so far (see https://github.com/opdenkamp/xbmc/pull/355).
Always read the XBMC online-manual, FAQ and search the forum before posting. Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules. For troubleshooting and bug reporting please make sure you read this first. ![]() |
| find quote |
yallah
Senior Member Joined: May 2011 Reputation: 0 Location: Cannes, France |
2012-02-29 13:00
Post: #1774
Montellese Wrote:Ah these PVR specific methods are not from me and I don't have them in my code because I don't use PVR yet. You might wanna contact FSSDawid which implemented the JSON-RPC extensions for PVR so far (see https://github.com/opdenkamp/xbmc/pull/355). ok thx |
| find quote |
jimk72
Senior Member Posts: 148 Joined: Jan 2005 Reputation: 0 |
2012-02-29 16:56
Post: #1775
Tolriq Wrote:For currently playing, you can ask for totaltime and time to get those informations. thanks!! that is exactly what I was looking for! |
| find quote |
Millencolin007
Senior Member Posts: 214 Joined: Mar 2012 Reputation: 7 Location: Switzerland |
2012-03-02 16:52
Post: #1776
I was playing around with the json api today and run into a couple of issues I wanted to share:
Files.PrepareDownload is not working as I expected on the windows platform. (tested with eden rc2/beta3) When retrieving a list of audio files using (AudioLibrary.GetSongs) the file paths are returned with backslashes in the path, which produces an error message when used as argument in the Files.PrepareDownload call. Request: {"jsonrpc": "2.0", "method": "Files.PrepareDownload", "params": { "path":"D:\MP3\123.mp3" }, "id": 1} Response: {"error":{"code":-32700,"message":"Parse error."},"id":null,"jsonrpc":"2.0"} Replacing the backslashes with forward slashes the call works. Request: {"jsonrpc": "2.0", "method": "Files.PrepareDownload", "params": { "path":"D:/MP3/123.mp3" }, "id": 1} Response: {"id":1,"jsonrpc":"2.0","result":{"details":{"path":"vfs/D%3a%2fMP3%2f123%2emp3"},"mode":"redirect","protocol":"http"}} The returned path (http://xbmc_ip: port/vfs/D%3a%2fMP3%2f123%2emp3 ) cannot be played by xbmc when it is added to a playlist using a json call like the following: {"jsonrpc": "2.0", "method": "Playlist.Add", "params" : { "playlistid" : 0 , "item" : { "file" : "%s" } }, "id" : 1 } If %2e is replaced with a . so that the file ends in .mp3 playback works. |
| find quote |
Montellese
Team-XBMC Developer Joined: Jan 2009 Reputation: 20 Location: Switzerland |
2012-03-02 18:20
Post: #1777
Millencolin007 Wrote:I was playing around with the json api today and run into a couple of issues I wanted to share:It's the job of either your JSON library or yourself to escape special characters and backslash (\) is a special character. XBMC does this as well but once you interpret it in your client as a string it will remove the double slashes. So you'll need to send the path as "D:\\MP3\\123.mp3" Millencolin007 Wrote:Replacing the backslashes with forward slashes the call works.This is not the correct way to go. Millencolin007 Wrote:The returned path (http://xbmc_ip: port/vfs/D%3a%2fMP3%2f123%2emp3 ) cannot be played by xbmc when it is added to a playlist using a json call like the following:I'm a bit confused. You use AudioLibrary.GetSongs, then Files.PrepareDownload (which is obviously meant to download the file through HTTP and not for playback) and then you use that result to play it again in XBMC? Why don't you use the "songid" of that particular song (which is returned by AudioLibrary.GetSongs) in the first place? Always read the XBMC online-manual, FAQ and search the forum before posting. Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules. For troubleshooting and bug reporting please make sure you read this first. ![]() |
| find quote |
Millencolin007
Senior Member Posts: 214 Joined: Mar 2012 Reputation: 7 Location: Switzerland |
2012-03-02 20:26
Post: #1778
Thanks, now that you say it, it makes absolutely sense to escape the backslash.
You are right. Normally one would add the song by songid. I used the prepare download function to retrieve the download url with the idea in mind to play this url on another xbmc instance or sending a playback request to an airplay capable device. |
| find quote |
Montellese
Team-XBMC Developer Joined: Jan 2009 Reputation: 20 Location: Switzerland |
2012-03-02 22:23
Post: #1779
Millencolin007 Wrote:You are right. Normally one would add the song by songid. I used the prepare download function to retrieve the download url with the idea in mind to play this url on another xbmc instance or sending a playback request to an airplay capable device. Ah right I didn't consider that. So it doesn't work with XBMC and other (non-xbmc) airplay capable devices? The problem is that the path after "/vfs/" can contain anything so we need to URL encode it. Not sure if it makes sense to URL encode everything except the dot before the file extension. Always read the XBMC online-manual, FAQ and search the forum before posting. Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules. For troubleshooting and bug reporting please make sure you read this first. ![]() |
| find quote |
digitaldesaster
Junior Member Posts: 32 Joined: Aug 2009 Reputation: 0 |
2012-03-02 22:45
Post: #1780
Hi,
i am playin around with json-rpc and jquery. Quote:<script> because of the cross-domain policy i get in trouble. this code does work in safari but not in chrome. is there an easy way without modifying the xbmc-server (php proxy) to get direct jquery access up and running in my lan ![]() regards dd |
| find quote |


![[Image: badge.gif]](http://www.ohloh.net/projects/9132/badge.gif)

Search
Help