cgi_refdata
info="${_GET[i]}"
-watch="${_GET[w]:-${_COOKIE[watch]}}"
location="$(invalidate "${_GET[l]}" '(.*/)?\.\.(/.*)?|' /)"
+foreign="$(validate "${_GET[url]}" 'https?://.*' '')"
order="${_POST[o]}"
search="${_POST[s]}"
filter="${_POST[f]}"
if [ "${_COOKIE[fakemp4]}" = yes ] && [ "${info##*.}" != mp4 ]; then
[ -e "${_DATA}/videos/${info%.*}.mp4" ] || ln -s "${_DATA}/videos/$info" "${_DATA}/mp4/${info%.*}.mp4"
videourl="$(urlsafe "mp4/${info%.*}.mp4")"
+elif [ -n "$foreign" ]; then
+ _COOKIE[watch]=server
+ videourl="${_GET[url]}"
elif [ -z "$info" ]; then
videourl="$(urlsafe "${location#/}")"
else
videourl="$(urlsafe "videos/$info")"
fi
-case "$watch" in
+case "$_COOKIE[watch]" in
raspi)
- rpiaddr="http://atoemchen.helmchyn.no-ip.biz/?action=watch&w=server&i="
+ rpiaddr="http://atoemchen.helmchyn.no-ip.biz/?action=watch&url="
redirect "${rpiaddr}$(urlsafe "http://jupiter:8000/${videourl}")"
;;
480p)