Kodi Community Forum

Full Version: "Method not found" for updating library via rpc
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I'm running a nightly build (dated July 27) on my ATV2. I used to be able to slap the webservice with:

Code:
curl --data-binary '{ "jsonrpc": "2.0", "method": "VideoLibrary.ScanForContent", "id": 1 }' -H 'content-type: text/plain;'  http://192.168.0.3:8080/jsonrpc

and have my library update. However, it seems with this release (or maybe earlier) it's erring out.

Code:
$ curl --data-binary '{ "jsonrpc": "2.0", "method": "VideoLibrary.ScanForContent", "id": 1 }' -H 'content-type: text/plain;'  http://192.168.0.3:8080/jsonrpc
{"error":{"code":-32601,"message":"Method not found."},"id":1,"jsonrpc":"2.0"}

I tried some other methods (e.g. pulling video file lists) and they worked just fine.

Has something changed? Debugging is turned on but while tailing the log file I don't see any indication of a problem (nothing is noted in the log file).
No offense, but most people (myself included) won't be able to see problems in the log file by looking at it ourselves. Post your log on pastebin and link to it in this thread for a dev to see.
Haa, no problem - I'll get it posted today, but like I said nothing regarding http calls or json is being placed in the debug logs.
I've posted the debug log.

http://pastebin.com/XgZnQMgP

No indication that it was attempted in the logs. I did, however, run:

Code:
/usr/bin/curl -s --data-binary '{ "jsonrpc": "2.0", "method": "VideoLibrary.GetTVShows", "id": "mybash"}' -H 'content-type: application/json;'  http://192.168.0.3:8080/jsonrpc

Which outputs in the log:

Code:
18:12:44 T:117579776 M:125890560   DEBUG: RunQuery took 105 ms for 27 items query: SELECT * FROM tvshowview
I can't imagine this is a configuration problem on my end. Does anyone else have this problem? Does anyone else update their library via json/rpc?
I see the same error with your command. I'm still using this:

Code:
wget -q -O - "http://192.168.4.13:8080/xbmcCmds/xbmcHttp?command=ExecBuiltIn&parameter=XBMC.updatelibrary(video)"

I believe this is deprecated, but still seems to work.
Yup, that works. Thanks, popcornmix. I wonder why that particular method is no longer working/valid . . .?
mjtice Wrote:I'm running a nightly build (dated July 27) on my ATV2. I used to be able to slap the webservice with:

Code:
curl --data-binary '{ "jsonrpc": "2.0", "method": "VideoLibrary.ScanForContent", "id": 1 }' -H 'content-type: text/plain;'  http://192.168.0.3:8080/jsonrpc

and have my library update. However, it seems with this release (or maybe earlier) it's erring out.

Code:
$ curl --data-binary '{ "jsonrpc": "2.0", "method": "VideoLibrary.ScanForContent", "id": 1 }' -H 'content-type: text/plain;'  http://192.168.0.3:8080/jsonrpc
{"error":{"code":-32601,"message":"Method not found."},"id":1,"jsonrpc":"2.0"}

I tried some other methods (e.g. pulling video file lists) and they worked just fine.

Has something changed? Debugging is turned on but while tailing the log file I don't see any indication of a problem (nothing is noted in the log file).

ATV2 uses pre-eden where its changed to VideoLibrary.Scan.

Quote: "VideoLibrary.Scan": {
"type": "method",
"description": "Scans the video sources for new library items",
"transport": "Response",
"permission": "UpdateData",
"params": [],
"returns": "string"
}