]> git.plutz.net Git - serve0/commitdiff
bugfix: sequence of mode checks
authorpaul <paul@plutz.net>
Mon, 28 Nov 2016 20:38:32 +0000 (20:38 +0000)
committerpaul <paul@plutz.net>
Mon, 28 Nov 2016 20:38:32 +0000 (20:38 +0000)
svn path=/trunk/; revision=160

actions/watch.sh

index 5d503b07d70a08737dbc364ddea5d553b4bd0068..5b4119f7612f6b51c32f367f9b4655e5d4531be2 100755 (executable)
@@ -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