Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F496
kodi-library-refresh.sh
keithzg (Keith Zubot-Gephart)
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Authored By
keithzg
Apr 10 2019, 5:18 PM
2019-04-10 17:18:09 (UTC-6)
Size
992 B
Referenced Files
None
Subscribers
None
kodi-library-refresh.sh
View Options
#!/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
Details
Attached
Mime Type
text/x-shellscript
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
380
Default Alt Text
kodi-library-refresh.sh (992 B)
Attached To
Mode
Automation
Attached
Detach File
Event Timeline
Log In to Comment