X-Git-Url: http://git.plutz.net/?a=blobdiff_plain;f=actions%2Fwatch.sh;h=1ba0954192943b07529c80d842b9670b3639cdf5;hb=d716f2ce1fe64cf87f777490315bc51906001c72;hp=4e42ed216e65ae3002217b6f6bbc3500cbf79d1c;hpb=c33f3dc315822ac102a7d5783827a5b9a1a4214f;p=serve0 diff --git a/actions/watch.sh b/actions/watch.sh index 4e42ed2..1ba0954 100755 --- a/actions/watch.sh +++ b/actions/watch.sh @@ -26,6 +26,8 @@ if [ "${_COOKIE[fakemp4]}" = yes ]; then if [ "$info" != "${fakename}.mp4" ]; then [ -e "${_DATA}/mp4/${fakename}.mp4" ] || ln -s "${_DATA}/videos/$info" "${_DATA}/mp4/${fakename}.mp4" videourl="$(urlsafe "mp4/${fakename}.mp4")" + else + videourl="$(urlsafe "videos/$info")" fi elif [ -n "$foreign" ]; then _COOKIE[watch]=server @@ -39,11 +41,9 @@ fi case "$_COOKIE[watch]" in raspi) - #rpiaddr="http://atoemchen.helmchyn.no-ip.biz/?action=watch" - #redirect "${rpiaddr}&url=$(urlsafe "http://${HTTP_HOST}/${videourl}")&return=$(urlsafe "http://${HTTP_HOST}/${_POST[page]}")" - ncat atoemchen 80 >&- <<-EOF + ncat "$RHOST" "$RPORT" >&- <<-EOF GET /?action=watch&url=$(urlsafe "http://${HTTP_HOST}/${videourl}") HTTP/1.1$(printf \\r) - Host: atoemchen$(printf \\r) + Host: ${RHOST}$(printf \\r) $(printf \\r) EOF redirect "?p=playctl&${watch_link}w=$(urlsafe "${_POST[page]}#${_GET[i]}")"