Page MenuHomePhorge
Authored By
keithzg
Apr 10 2019, 5:18 PM
Size
992 B
Referenced Files
None
Subscribers
None

kodi-library-refresh.sh

#!/bin/bash
# Change these values to yours if you aren't just blithely using Kodi's default settings
USERNAME="kodi"
PASSWORD="kodi"
HOSTNAME="localhost"
PORT="8080"
# First, we scan for new items
curl --data-binary '{ "jsonrpc": "2.0", "method": "VideoLibrary.Scan", "id": "mybash"}' -H 'content-type: application/json;' http://${USERNAME}:${PASSWORD}@${HOSTNAME}:${PORT}/jsonrpc
curl --data-binary '{ "jsonrpc": "2.0", "method": "AudioLibrary.Scan", "id": "mybash"}' -H 'content-type: application/json;' http://${USERNAME}:${PASSWORD}@${HOSTNAME}:${PORT}/jsonrpc
# Now, we clean up anything that's no longer available
curl --data-binary '{ "jsonrpc": "2.0", "method": "VideoLibrary.Clean", "id": "mybash"}' -H 'content-type: application/json;' http://${USERNAME}:${PASSWORD}@${HOSTNAME}:${PORT}/jsonrpc
curl --data-binary '{ "jsonrpc": "2.0", "method": "AudioLibrary.Clean", "id": "mybash"}' -H 'content-type: application/json;' http://${USERNAME}:${PASSWORD}@${HOSTNAME}:${PORT}/jsonrpc

File Metadata

Mime Type
text/x-shellscript
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
380
Default Alt Text
kodi-library-refresh.sh (992 B)

Event Timeline