Kodi Maintenance via the command line
#1
I am creating this tread to compile a list of working terminal commands to do various maintenance tasks on Kodi
I use a lot of bash scripts to move files around and do kodi maintenance so over time I have needed to implement various Kodi tasks such as

clean library
Code:
##todo - suggestions appreciated

scan video library
Code:
curl --data-binary '{ "jsonrpc": "2.0", "method": "VideoLibrary.Scan", "id": "mybash"}' -H 'content-type: application/json;' http://192.168.1.100:8080/jsonrpc

export video library to single file #I run this on a cron schedule weekly
Code:
curl --include --header 'content-type: application/json;' --request POST --data '{ "jsonrpc": "2.0", "method": "VideoLibrary.Export", "params": { "options": { "path": "nfs://nas/volume1/video/db" } }, "id": 1 }' http://192.168.1.100:8080/jsonrpc

export video library to individual files(in each individual video file directory) as if done from >settings>video>export library to individual files
Code:
##todo - suggestions appreciated

post messages to kodi
Code:
curl -X POST -H "Content-Type: application/json" -d '{"jsonrpc":"2.0","method":"GUI.ShowNotification","params":{"title":"Running Import Script","message":"system may slow down during scan"},"id":1}' http://192.168.1.100:8080/jsonrpc

more to come, please contribute
cheers
Reply
#2
Nice work, but.....

http://kodi.wiki/view/HOW-TO:Remotely_update_library

it already exists
Reply

Logout Mark Read Team Forum Stats Members Help
Kodi Maintenance via the command line0