I’m attempting to start a movie from the beginning, remotely using curl in bash.
my code looks like:
Code:
curl -m 10 -s -X POST -H "Content-Type: application/json" -d '{ "jsonrpc": "2.0", "method": "Player.Open", "params": { "options":{ "resume":false }, "item": { "movieid": '"$movie_id"' } }, "id": 1 }' http://10.0.0.50:8080/jsonrpc
$movie_id being the id of the movie of course.
Even though resume option is “false” the movie ALWAYS resumes.
The only way I could get it to start from the beginning was by a fluke copy and paste:
Code:
curl -m 10 -s -X POST -H "Content-Type: application/json" -d '{ "jsonrpc": "2.0", "method": "Player.Open", "params": { "options":{ "resume":false }, "item": { "movieid": '"$movie_id"' } }, "id": 1 }' http://10.0.0.50:8080/jsonrpc curl -m 10 -s -X POST -H "Content-Type: application/json" -d '{ "jsonrpc": "2.0", "method": "Player.Open", "params": { "options":{ "resume":false }, "item": { "movieid": '"$movie_id"' } }, "id": 1 }' http://10.0.0.50:8080/jsonrpc
Having the code doubled (I pasted one too many times whoops) resumes the movie for a split second and then goes to the beginning.
I’d rather not have to rely on what seems to be an error to start movies like this. Any help or recommendation would be appreciated..