Created
December 16, 2016 13:46
-
-
Save ktaragorn/3a138330a29592ab9582dca30dddd604 to your computer and use it in GitHub Desktop.
Simple CLI to run scan or clean on kodi video library
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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:[email protected]:8080/jsonrpc |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment