Skip to content

Instantly share code, notes, and snippets.

@ktaragorn
Created December 16, 2016 13:46
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 ktaragorn/3a138330a29592ab9582dca30dddd604 to your computer and use it in GitHub Desktop.
Save ktaragorn/3a138330a29592ab9582dca30dddd604 to your computer and use it in GitHub Desktop.
Simple CLI to run scan or clean on kodi video library
if [ "$1" == "clean" ]
then
operation="Clean"
elif [ "$1" == "scan" ]
then
operation="Scan"
else
echo "Enter valid operation"
exit 1
fi
curl --data-binary "{ \"jsonrpc\": \"2.0\", \"method\": \"VideoLibrary.$operation\", \"id\": \"mybash\"}" -H 'content-type: application/json;' http://kodi:kodi@192.168.1.244:8080/jsonrpc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment