[SOLVED] Quick JSON Question

  Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
jacintech.fire Offline
Banned
Posts: 385
Joined: Oct 2011
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:
(This post was last modified: 2014-02-01 01:58 by jacintech.fire.)
find quote
jacintech.fire Offline
Banned
Posts: 385
Joined: Oct 2011
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
(This post was last modified: 2014-02-02 04:46 by jacintech.fire.)
find quote
Kib Online
Team-Kodi Server Dude
Posts: 4,236
Joined: Jan 2010
Reputation: 66
Location: NL
Post: #3
http://wiki.xbmc.org/?title=JSON-RPC_API#Documentation

Do not PM or email Team-Kodi members asking for support. Read and follow the forum rules.
For troubleshooting and bug reporting, make sure you read this first.
find quote
jacintech.fire Offline
Banned
Posts: 385
Joined: Oct 2011
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...
find quote