Windows - need help with simple json-rpc script

  Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
KRA77 Offline
Senior Member
Posts: 291
Joined: Jul 2010
Reputation: 0
Post: #16
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 ?
find quote
HenryFord Offline
Posting Freak
Posts: 1,274
Joined: Jan 2010
Reputation: 19
Post: #17
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.

Need help? Check out my XBMC Frodo Guide. It contains full featured guides to Sickbeard and CouchPotato as well.

[Image: all-fanart.jpg]
find quote
Mizaki Offline
Fan
Posts: 726
Joined: Apr 2011
Reputation: 14
Post: #18
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 }

[Image: watched-clearlogo.jpg]
AWXi - Ajax web interface. Wiki
find quote
HenryFord Offline
Posting Freak
Posts: 1,274
Joined: Jan 2010
Reputation: 19
Post: #19
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

Need help? Check out my XBMC Frodo Guide. It contains full featured guides to Sickbeard and CouchPotato as well.

[Image: all-fanart.jpg]
find quote
KRA77 Offline
Senior Member
Posts: 291
Joined: Jul 2010
Reputation: 0
Post: #20
Thanks for the help
find quote
darksheep Offline
Junior Member
Posts: 13
Joined: Nov 2011
Reputation: 0
Post: #21
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.
find quote
sparkie2640 Offline
Junior Member
Posts: 33
Joined: Sep 2008
Reputation: 2
Post: #22
wget -Oz:\jsonrpc.log -q -T 1 -t 1 "http://username:password@192.168.0.50: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
(This post was last modified: 2013-02-05 05:15 by sparkie2640.)
find quote
Post Reply