Skip to content
Snippets Groups Projects
Commit 32caa914 authored by nimrod's avatar nimrod
Browse files

Fix the Kodi library scan function.

The script in Poquita only scans the audio library. The one in the
Transmission image requires some environment variables and also sends a
notification to Nextcloud. So fallback to using cURL.
parent 7d76c541
No related branches found
No related tags found
No related merge requests found
...@@ -116,7 +116,6 @@ alias green="printf '\e[1;92m%s\e[0m\n'" ...@@ -116,7 +116,6 @@ alias green="printf '\e[1;92m%s\e[0m\n'"
alias hcl2json='json2hcl -reverse' alias hcl2json='json2hcl -reverse'
alias hostlocal='docker run --rm --privileged --net=host docker.io/gliderlabs/hostlocal' alias hostlocal='docker run --rm --privileged --net=host docker.io/gliderlabs/hostlocal'
alias jjb='jenkins-jobs' alias jjb='jenkins-jobs'
alias kodi_scan="docker --host=ssh://kodi.shore.co.il exec poquita-poquita-1 kodi_scan"
alias l='ls -F' alias l='ls -F'
alias la='ls -AF' alias la='ls -AF'
alias lh='ls -lhAS' alias lh='ls -lhAS'
...@@ -230,6 +229,13 @@ gen_csr () { ...@@ -230,6 +229,13 @@ gen_csr () {
openssl req -new -newkey rsa:4096 -nodes -out "$name.csr" -keyout "$name.key" openssl req -new -newkey rsa:4096 -nodes -out "$name.csr" -keyout "$name.key"
} }
kodi_scan () {
# shellcheck disable=SC1083
ssh kodi.shore.co.il curl --silent --fail --show-error --json \'{\"jsonrpc\": \"2.0\", \"id\": \"transmission\", \"method\": \"VideoLibrary.Scan\"}\' http://127.0.0.1:8080/jsonrpc; echo
# shellcheck disable=SC1083
ssh kodi.shore.co.il curl --silent --fail --show-error --json \'{\"jsonrpc\": \"2.0\", \"id\": \"transmission\", \"method\": \"AudioLibrary.Scan\"}\' http://127.0.0.1:8080/jsonrpc; echo
}
match_ssl_pair () { match_ssl_pair () {
if [ "$#" -ne 2 ] if [ "$#" -ne 2 ]
then then
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment