JSON command to seek at a specific time
#1
Hello,

I update Kodi (Libreelec) to the last version, and my command to seek to a specific time and minute does not work anymore.
I use this command with curl IE to go to 00:10:00 of a video.

curl 'http://192.168.1.11:8080/jsonrpc?Player.Seek' -H 'User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:86.0) Gecko/20100101 Firefox/86.0' -H 'Accept: text/plain, */*; q=0.01' -H 'Accept-Language: fr,fr-FR;q=0.8,en-US;q=0.5,en;q=0.3' --compressed -H 'Content-Type: application/json' -H 'X-Requested-With: XMLHttpRequest' -H 'Origin: http://192.168.1.11:8080' -H 'Connection: keep-alive' -H 'Referer: http://192.168.1.11:8080/' --data-raw '[{"jsonrpc":"2.0","method":"Player.Seek","params":{ "playerid":1, "value":{ "hours":0, "minutes":10, "seconds":0} },"id":1}}]'

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

With my old version of Kodi this command works.

Can you help me to do the same thing with the new version ?
Reply
#2
In case you haven't solved the issue yet. I run into the same issue today. The request has changed and now hours, minutes and seconds need to be wrapped in a time property

Code:
curl -u kodi:kodi -H "Content-Type: application/json"  -d '{"jsonrpc":"2.0","method":"Player.Seek","params":{"playerid":1,"value":{"time":{"hours":0,"minutes":29,"seconds":54}}},"id":1}' http://192.168.1.11:8080/jsonrpc
Reply

Logout Mark Read Team Forum Stats Members Help
JSON command to seek at a specific time0