diff options
Diffstat (limited to 'call-subsonic')
-rwxr-xr-x | call-subsonic | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/call-subsonic b/call-subsonic new file mode 100755 index 0000000..7a75d49 --- /dev/null +++ b/call-subsonic @@ -0,0 +1,11 @@ +#!/bin/bash + +password="${SUBSONIC_PASSWORD:?please set the password}" +enc_password="$(hexdump --format '1/1 "%02x"' <<<$password)" +enc_password="${enc_password%0a}" + +method="${1:?please pass a method}" +shift; +IFS='&';args="$*" + +curl -v "https://subsonic.thenautilus.net/rest/${method}?v=1.12.0&c=myapp&u=dakkar&p=enc:${enc_password}&${args}" |