From: paul Date: Mon, 28 Nov 2016 20:38:32 +0000 (+0000) Subject: bugfix: sequence of mode checks X-Git-Url: http://git.plutz.net/?p=serve0;a=commitdiff_plain;h=7325a10deded9a135b354e77d231a0ab38e13925 bugfix: sequence of mode checks svn path=/trunk/; revision=160 --- diff --git a/actions/watch.sh b/actions/watch.sh index 5d503b0..5b4119f 100755 --- a/actions/watch.sh +++ b/actions/watch.sh @@ -28,11 +28,11 @@ linkinfo="$(urlsafe "$info")" 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 [ -z "$info" ]; then - videourl="$(urlsafe "${location#/}")" -elif [ -z "$foreign" ]; then +elif [ -n "$foreign" ]; then _COOKIE[watch]=server videourl="${_GET[url]}" +elif [ -z "$info" ]; then + videourl="$(urlsafe "${location#/}")" else videourl="$(urlsafe "videos/$info")" fi