X-Git-Url: http://git.plutz.net/?a=blobdiff_plain;f=pages%2Fplayctl.sh;fp=pages%2Fplayctl.sh;h=f8247e02d33cbf1278b96ab7c35ee434929dac6b;hb=5b144c02682c833344dbe71c55b7dc53f63ef45d;hp=36363516a0e2d9422e252fd94ceda8355ef8ec45;hpb=b3db7c81d8a072f32454612696c367dbcd301529;p=serve0 diff --git a/pages/playctl.sh b/pages/playctl.sh index 3636351..f8247e0 100755 --- a/pages/playctl.sh +++ b/pages/playctl.sh @@ -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'