]> git.plutz.net Git - serve0/blobdiff - actions/watch.sh
send reference to return page when playing externally
[serve0] / actions / watch.sh
index 5e0281986541be2e99b7736652e2f1eb9671a22c..5aff94559b1c65d7e32759572d8a7110e711dbda 100755 (executable)
@@ -27,7 +27,7 @@ if [ "${_COOKIE[fakemp4]}" = yes ] && [ "${info##*.}" != mp4 ]; then
 elif [ -n "$foreign" ]; then
   _COOKIE[watch]=server
   videourl="${_GET[url]}"
-  watch_link="${_GET[return]}"
+  watch_link="w=$(urlsafe "${_GET[return]}")"
 elif [ -z "$info" ]; then
   videourl="$(urlsafe "${location#/}")"
 else
@@ -37,7 +37,7 @@ 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]}")"
+    redirect "${rpiaddr}&url=$(urlsafe "http://${HTTP_HOST}/${videourl}")&return=$(urlsafe "http://${HTTP_HOST}/${_POST[page]}")"
   ;;
   480p)
     [ $height -gt 480 ] && redirect "?action=transcode&i=${linkinfo}&t=480" \