Thread Rating:
  • 0 Vote(s) - 0 Average
"Method not found" for updating library via rpc
#1
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).
Reply
#2
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.
Reply
#3
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.
Reply
#4
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
Reply
#5
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?
Reply
#6
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.
Reply
#7
Yup, that works. Thanks, popcornmix. I wonder why that particular method is no longer working/valid . . .?
Reply
#8
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"
}
If you have problems please read this before posting

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.

Image

"Well Im gonna download the code and look at it a bit but I'm certainly not a really good C/C++ programer but I'd help as much as I can, I mostly write in C#."
Reply



"Method not found" for updating library via rpc00