[SOLVED] Quick JSON Question

  Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
jacintech.fire Offline
Fan
Posts: 367
Joined: Oct 2011
Reputation: 1
Location: Porto Novo, Benin
Post: #1
This is the JSON call to update the whole library:

Quote: "VideoLibrary.Scan": {
"description": "Scans the video sources for new library items",
"params": [
{
"default": "",
"name": "directory",
"type": "string"
}
],
"returns": {
"type": "string"
},
"type": "method"
}
Here is the RPC:
Quote:curl --data-binary '{ "jsonrpc": "2.0", "method": "VideoLibrary.Scan", "id": "mybash"}' -H 'content-type: application/json;' http://<xbmc_remote_client_ip_address>/jsonrpc
Question: How do you specify the "directory" in the call so that only the defined directory is updated:

EVERY elevation of the type "man," has hitherto been the work of an aristocratic society and so it will always be--a society believing in a long scale of gradations of rank and differences of worth among human beings, and requiring slavery in some form or other...
--Friedrich Nietzsche, Beyond Good and Evil--
(This post was last modified: 2014-02-01 01:58 by jacintech.fire.)
find quote
jacintech.fire Offline
Fan
Posts: 367
Joined: Oct 2011
Reputation: 1
Location: Porto Novo, Benin
Post: #2
Anybody...?
**UPDATE SOLVED**

Quote:curl --data-binary '{ "jsonrpc": "2.0", "method": "VideoLibrary.Scan", "id": "mybash", "params": {"directory":"<[protocol]://directory_path/>"}}' -H 'content-type: application/json;' http://<remote_xbmc_client_ip_address>/jsonrpc

EVERY elevation of the type "man," has hitherto been the work of an aristocratic society and so it will always be--a society believing in a long scale of gradations of rank and differences of worth among human beings, and requiring slavery in some form or other...
--Friedrich Nietzsche, Beyond Good and Evil--
(This post was last modified: 2014-02-02 04:46 by jacintech.fire.)
find quote
Kib Offline
Team-Kodi Server Dude
Posts: 3,550
Joined: Jan 2010
Reputation: 54
Location: NL
Post: #3
http://wiki.xbmc.org/?title=JSON-RPC_API#Documentation

Neon skin - v3.0.8 now available for XBMC 13.x (Gotham)
find quote
jacintech.fire Offline
Fan
Posts: 367
Joined: Oct 2011
Reputation: 1
Location: Porto Novo, Benin
Post: #4
(2014-02-02 04:21)Kib Wrote:  http://wiki.xbmc.org/?title=JSON-RPC_API#Documentation

Yes. Found it yesterday, thanks...

EVERY elevation of the type "man," has hitherto been the work of an aristocratic society and so it will always be--a society believing in a long scale of gradations of rank and differences of worth among human beings, and requiring slavery in some form or other...
--Friedrich Nietzsche, Beyond Good and Evil--
find quote