XBMC Community Forum
JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - Printable Version

+- XBMC Community Forum (http://forum.xbmc.org)
+-- Forum: Development (/forumdisplay.php?fid=32)
+--- Forum: Development (/forumdisplay.php?fid=93)
+---- Forum: JSON-RPC (/forumdisplay.php?fid=174)
+---- Thread: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC (/showthread.php?tid=68263)



- yallah - 2012-02-28 15:53

hi,

Is it possible via Json to put video in full screen or window inside template (like "tab" button)??


- Montellese - 2012-02-28 15:57

Currently not but I have already done the necessary coding for a GUI.SetFullscreen() method which will be available after Eden has been released.


- yallah - 2012-02-28 16:02

Montellese Wrote:Currently not but I have already done the necessary coding for a GUI.SetFullscreen() method which will be available after Eden has been released.

thxfor quick reply Wink


Determining if library is being scanned - tack - 2012-02-28 17:38

In Dharma, I was able to detect if XBMC was scanning the library by using the System.GetInfoBooleans method with params ["library.isscanning"]. I see that in Eden the method is now XBMC.GetInfoBooleans, but it's not accepting library.isscanning. It comes back with an "invalid type string received" error:

Code:
{"params": ["library.isscanning"], "jsonrpc": "2.0", "method": "XBMC.GetInfoBooleans", "id": 1}
{"error":{"code":-32602,"data":{"method":"XBMC.GetInfoBooleans","stack":{"message":"Invalid type string received","name":"booleans","type":"array"}},"message":"Invalid params."},"id":1,"jsonrpc":"2.0"}

It's not clear to me what the proper parameters should be now. Can someone point me in the right direction? Or perhaps with Eden there is a better way to determine if it's currently scanning the library?

Thanks!


- Montellese - 2012-02-28 20:54

Please take a look at the documentation in the wiki or at the output of JSONRPC.Introspect. It's very clearly written that the "params" object/array needs to contain an array of strings (named "booleans" in case you use parameters-by-name): http://wiki.xbmc.org/index.php?title=JSON-RPC_API/v4#XBMC.GetInfoBooleans

So you're request needs to be
Code:
{"params": { "booleans": ["library.isscanning"] }, "jsonrpc": "2.0", "method": "XBMC.GetInfoBooleans", "id": 1}



- tack - 2012-02-28 21:10

Montellese Wrote:It's very clearly written that the "params" object/array needs to contain an array of strings (named "booleans" in case you use parameters-by-name):
Thanks Montellese. I should have expanded the JSON schema description where this is very clear. I didn't pay proper attention to the description of the interface changes.

In any case, the "JSON RPC: Important changes" thread says that XBMC.GetInfoBooleans is considered deprecated. Is there a non-deprecated way at this time to determine if the library is currently being scanned?

Thanks again.


- Montellese - 2012-02-28 21:11

No there isn't.


- tack - 2012-02-28 21:29

All right. While I have you, in case it's not already on your to-do list, I thought I'd mention that there are two things that keep me using the deprecated HTTP API which (from what I can tell) the JSON-RPC doesn't support yet:

1. XBMC.Notification via ExecBuiltIn
2. XBMC.updatelibrary via ExecBuiltIn -- I understand there is VideoLibrary.Scan, but I need the ability to specify a sub-path, whereas VideoLibrary.Scan does a full library scan.

Not urgent while the HTTP API exists, but I'd certainly not want the HTTP API to vanish before the JSON API exposes at least this functionality. Smile


- Montellese - 2012-02-28 21:31

I have already implemented both methods/changes, they are just waiting for Eden to get out of the door Wink


- yallah - 2012-02-29 10:37

Hi,

Little bug for Json PVR. Can't use it when some OSD is present. Working very well when i'm in full screen (not when i m in PVR screen ,EPG, or when tv video is in miniature when you are in home page...)

Thx