]> git.plutz.net Git - serve0/blobdiff - actions/watch.sh
use HTT_HOST in coop redirect
[serve0] / actions / watch.sh
index 5b4119f7612f6b51c32f367f9b4655e5d4531be2..cfa543723f289e1d1f6fe0a1ef29c36a0e10fbe8 100755 (executable)
@@ -40,7 +40,7 @@ fi
 case "$_COOKIE[watch]" in
   raspi)
     rpiaddr="http://atoemchen.helmchyn.no-ip.biz/?action=watch&url="
-    redirect "${rpiaddr}$(urlsafe "http://jupiter:8000/${videourl}")"
+    redirect "${rpiaddr}$(urlsafe "http://${HTTP_HOST}/${videourl}")"
   ;;
   480p)
     [ $height -gt 480 ] && redirect "?action=transcode&i=${linkinfo}&t=480" \
@@ -56,6 +56,7 @@ case "$_COOKIE[watch]" in
   server)
     [ -n "$location" ] && playuri="${treeroot%/}/${location#/}"
     [ -n "$info" ]     && playuri="${_DATA}/videos/$info"
+    [ -n "$foreign" ]  && playuri="$videourl"
 
     metafile="${_DATA}/meta/${info}.meta"