Compare commits

...

2 Commits

Author SHA1 Message Date
Pascal Abresch 82c60c8f4e update readme, small fix 2020-03-06 05:19:05 +01:00
Pascal Abresch 1346ddc4c0 make completely relocateable 2020-03-06 05:13:34 +01:00
3 changed files with 11 additions and 4 deletions

8
README
View File

@ -3,4 +3,10 @@ create the file "user" with your username and password in the form of "user:pass
then you can call remote
use aremote if you are on android
deps:
posix sh
curl
echo
readlink -f
dirname

View File

@ -1 +1,2 @@
curl -s --data-binary @json/$1 -H 'content-type: application/json;' $(cat server)/jsonrpc --anyauth --user $(cat user) --connect-timeout 1
pw_path=$(dirname $(readlink -f $0))
curl -s --data-binary @$pw_path/json/$1 -H 'content-type: application/json;' $(cat $pw_path/server)/jsonrpc --anyauth --user $(cat $pw_path/user) --connect-timeout 1

4
remote
View File

@ -6,7 +6,7 @@ echo "Y/Z: track back X: track next "
echo " J: jump back K: pause/play L: jump forward "
echo "+/N: volume up -/B: volume down M: mute/unmute "
pw_path=$(dirname $0)
pw_path=$(dirname $(readlink -f $0))
while true;
do
eval read -n 1 -s character
@ -30,7 +30,7 @@ do
sh $pw_path/jsoncall contextmenu > /dev/null
;;
j)
sh $pw_path/jsoncall smallbackward > /dev/null
sh $pw_path/jsoncall smallbackward > /dev/null
;;
k)
sh $pw_path/jsoncall pauseplay > /dev/null