Kodi Community Forum
Win need help with simple json-rpc script - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Development (https://forum.kodi.tv/forumdisplay.php?fid=32)
+--- Forum: Add-ons (https://forum.kodi.tv/forumdisplay.php?fid=26)
+--- Thread: Win need help with simple json-rpc script (/showthread.php?tid=131289)

Pages: 1 2


RE: need help with simple json-rpc script - KRA77 - 2012-05-13

A spesific path would sure help a lot and be better than full library update. Do you know the jsonrpc call that must be used ?


RE: need help with simple json-rpc script - HenryFord - 2012-05-13

There is currently no such JSON-Call as far as I can tell. Also: There isn't one in Frodo either, at least not that I could see it.


RE: need help with simple json-rpc script - Mizaki - 2012-05-13

From Frodo:
Code:
{
    "id": 1,
    "jsonrpc": "2.0",
    "result": {
        "description": "JSON-RPC API of XBMC",
        "id": "http://www.xbmc.org/jsonrpc/ServiceDescription.json",
        "methods": {
            "VideoLibrary.Scan": {
                "description": "Scans the video sources for new library items",
                "params": [
                    {
                        "default": "",
                        "name": "directory",
                        "type": "string"
                    }
                ],
                "returns": {
                    "type": "string"
                },
                "type": "method"
            }
        },
        "version": 5
    }
}
{ "jsonrpc": "2.0", "method": "JSONRPC.Introspect", "params": { "filter": { "id": "VideoLibrary.Scan", "type": "method" } }, "id": 1 }


RE: need help with simple json-rpc script - HenryFord - 2012-05-13

Yup, you're right - didn't call onto the specifics since VideoLibrary.Scan has been there before but without the parameters. So - yeah, only possible with Frodo then Smile


RE: need help with simple json-rpc script - KRA77 - 2012-05-14

Thanks for the help


RE: need help with simple json-rpc script - darksheep - 2012-05-15

Hi I have a powershell script that does some thing in the backround I would like it to send a msg to xbmc so that a msg would pop up on screen and say done for example.

Does any one have some sample code of how to do this ?

Ps my xbmc has a user name and password on the web interface and need to keep it ,for some other stuff i use.

Thank you for your time and help.


RE: need help with simple json-rpc script - sparkie2640 - 2013-02-04

wget -Oz:\jsonrpc.log -q -T 1 -t 1 "http://username:[email protected]:8080/jsonrpc?request={\"jsonrpc\":\"2.0\",\"method\":\"GUI.ShowNotification\",\"params\":{\"title\":\"Download Complete\",\"message\":\"%1\"}}"

Where username is whatever username you're using, password is whatever password you're using. Change 192.168.0.50:8080 to whatever IP and port you're using and z:\jsonrpc.log to wherever you'd like the log file to be stored. When you call it, you can submit something like 'test.bat blah' and it will display "Download Complete: blah" on your tv screen.

Edit - fixed quotes