Seemingly simple task - list movies from command line.
#1
Hi - this may seem very basic but I've been running into a dead end for so long I'm ready to pop. Any help is appreciated.

I'm just trying to get some response from a simple call to my Kodi 16 install - ie GetMovies. I'm trying this from the Ubuntu instance that Kodi is installed on via:

wget -qO- http://MyServerIP:8080/jsonrpc?request={"jsonrpc": "2.0", "method": "VideoLibrary.GetMovies", "id": 1}

I'm getting the error:

{"error":{"code":-32700,"message":"Parse error."},"id":null,"jsonrpc":"2.0"}

I've tried countless other things and am wondering if I'm not using this kind of call correctly? I'm looking for any way to get any information from command-line in linux.
Reply
#2
So - in case anyone else is searching I'll answer. wget didn't work, at least for me (it was given as a solution in another thread on this site). curl worked - specifically, for this task:

at the linux prompt run:

curl -s --data-binary '{"jsonrpc": "2.0", "method": "VideoLibrary.GetMovies", "id": 1}' -H 'content-type: application/json;' http://192.168.xx.xx:8080/jsonrpc

and if you have a username/password:

curl -u username:password -s --data-binary '{"jsonrpc": "2.0", "method": "VideoLibrary.GetMovies", "id": 1}' -H 'content-type: application/json;' http://192.168.xx.xx:8080/jsonrpc

replacing the 192.168.xx.xx with appropriate IP, the port with appropriate port, and you should get output. Phew... that took too long.
Reply

Logout Mark Read Team Forum Stats Members Help
Seemingly simple task - list movies from command line.0