From 1ad75c4c6792a7e7184a41fe703a594803be48bf Mon Sep 17 00:00:00 2001 From: dakkar Date: Sat, 23 Dec 2017 15:34:36 +0000 Subject: script to call my subsonic server --- call-subsonic | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100755 call-subsonic 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}" -- cgit v1.2.3