Skip to content

Instantly share code, notes, and snippets.

@hamidzr
Created April 24, 2017 16:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hamidzr/fb82c7ce2bdcf6cedd3e63a340ccae29 to your computer and use it in GitHub Desktop.
Save hamidzr/fb82c7ce2bdcf6cedd3e63a340ccae29 to your computer and use it in GitHub Desktop.
play generic uri to kodi instance.
#!/bin/bash
# pass a uri as an argument to play
curl -s --data-ascii '{"jsonrpc":"2.0","id":"1","method":"Application.SetVolume","params":{"volume":70}}' -H 'content-type: application/json;' http://localhost:8080/jsonrpc
curl -s --data-ascii '{"jsonrpc":"2.0","id":"1","method":"Player.Open","params":{"item":{"file":"'$1'"}}}' -H 'content-type: application/json;' http://hpi:8080/jsonrpc
@hamidzr
Copy link
Author

hamidzr commented Apr 24, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment