Initial Commit
This commit is contained in:
parent
83ca292956
commit
c1fced6f00
39
update-kodi
Executable file
39
update-kodi
Executable file
@ -0,0 +1,39 @@
|
||||
user=osmc
|
||||
password=osmc
|
||||
host=osmc
|
||||
port=80
|
||||
case $1 in
|
||||
vs|VideoScan)
|
||||
ping -c 1 $host >/dev/null 2>&1
|
||||
if [ $? == 0 ]
|
||||
then
|
||||
curl --data-binary '{ "jsonrpc": "2.0", "method": "VideoLibrary.Scan", "id": "mybash"}' -H 'content-type: application/json;' http://$user:$password@$host:$port/jsonrpc
|
||||
else
|
||||
echo $host " ist down"
|
||||
fi
|
||||
echo
|
||||
curl --data-binary '{ "jsonrpc": "2.0", "method": "VideoLibrary.Scan", "id": "mybash"}' -H 'content-type: application/json;' http://kodi:kodi@coreelec:8080/jsonrpc
|
||||
;;
|
||||
as|AudioScan)
|
||||
curl --data-binary '{ "jsonrpc": "2.0", "method": "AudioLibrary.Scan", "id": "mybash"}' -H 'content-type: application/json;' http://$user:$password@$host:$port/jsonrpc
|
||||
;;
|
||||
vc|VideoClean)
|
||||
curl --data-binary '{ "jsonrpc": "2.0", "method": "VideoLibrary.Clean", "id": "mybash"}' -H 'content-type: application/json;' http://$user:$password@$host:$port/jsonrpc
|
||||
;;
|
||||
ac|AudioClean)
|
||||
curl --data-binary '{ "jsonrpc": "2.0", "method": "AudioLibrary.Clean", "id": "mybash"}' -H 'content-type: application/json;' http://$user:$password@$host:$port/jsonrpc
|
||||
;;
|
||||
rb|Reboot)
|
||||
curl --data-binary '{ "jsonrpc": "2.0", "method": "System.Reboot", "id": "mybash"}' -H 'content-type: application/json;' http://$user:$password@$host:$port/jsonrpc
|
||||
;;
|
||||
*)
|
||||
echo $0 VideoScan
|
||||
echo $0 AudioScan
|
||||
echo $0 VideoClean
|
||||
echo $0 AudioClean
|
||||
exit 1
|
||||
esac
|
||||
|
||||
#curl --data-binary '{ "jsonrpc": "2.0", "method": "VideoLibrary.Scan", "id": "mybash"}' -H 'content-type: application/json;' http://osmc:osmc@osmc:80/jsonrpc
|
||||
|
||||
echo
|
Loading…
x
Reference in New Issue
Block a user