]> git.plutz.net Git - serve0/blobdiff - pages/playctl.sh
set up remote player in local.opts
[serve0] / pages / playctl.sh
index 36363516a0e2d9422e252fd94ceda8355ef8ec45..f8247e02d33cbf1278b96ab7c35ee434929dac6b 100755 (executable)
@@ -44,10 +44,10 @@ head -n1 "$meta" |read length width height TITLE
 debug VIDEO: $video
 
 if [ "$_COOKIE[watch]" = raspi ]; then
-  actionuri='//atoemchen/?action=playctl'
-  volume="$({ncat atoemchen 80 <<-EOF
+  actionuri="//${RHOST}:${RPORT}/?action=playctl"
+  volume="$({ncat "$RHOST" "$RPORT" <<-EOF
        GET /?action=playctl&api=volume HTTP/1.0${CR}
-       Host: atoemchen${CR}
+       Host: ${RHOST}${CR}
        ${CR}
        EOF
   } | sed -r '1,/^\r$/d')"
@@ -71,9 +71,9 @@ printf 'Refresh: 1\r\n'
 
 progress(){
   if [ "$_COOKIE[watch]" = raspi ]; then
-    { ncat atoemchen 80 <<-EOF
+    { ncat "$RHOST" "$RPORT" <<-EOF
        GET /?action=playctl&api=progress HTTP/1.0${CR}
-       Host: atoemchen${CR}
+       Host: ${RHOST}${CR}
        ${CR}
        EOF
     } | sed -ur '1,/^\r$/d'