From e542e0a34e796df05efa42cdb091ba4032836bdd Mon Sep 17 00:00:00 2001 From: paul Date: Mon, 28 Nov 2016 20:28:39 +0000 Subject: [PATCH] extending cooperation functions svn path=/trunk/; revision=158 --- actions/watch.sh | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) 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) -- 2.39.2