From: paul Date: Mon, 28 Nov 2016 20:28:39 +0000 (+0000) Subject: extending cooperation functions X-Git-Url: https://git.plutz.net/?a=commitdiff_plain;h=e542e0a34e796df05efa42cdb091ba4032836bdd;p=serve0 extending cooperation functions svn path=/trunk/; revision=158 --- diff --git a/actions/watch.sh b/actions/watch.sh index cc47088..58c1e1b 100755 --- a/actions/watch.sh +++ b/actions/watch.sh @@ -2,8 +2,8 @@ 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]}" @@ -30,13 +30,16 @@ if [ "${_COOKIE[fakemp4]}" = yes ] && [ "${info##*.}" != mp4 ]; then videourl="$(urlsafe "mp4/${info%.*}.mp4")" elif [ -z "$info" ]; then videourl="$(urlsafe "${location#/}")" +else [ -z "$foreign" ];then + _COOKIE[watch]=server + videourl="${_GET[url]}" 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)