]> git.plutz.net Git - serve0/commitdiff
send reference to return page when playing externally
authorpaul <paul@plutz.net>
Wed, 8 Feb 2017 14:24:20 +0000 (14:24 +0000)
committerpaul <paul@plutz.net>
Wed, 8 Feb 2017 14:24:20 +0000 (14:24 +0000)
svn path=/trunk/; revision=176

actions/watch.sh
templates/playctl.html.sh

index 5e0281986541be2e99b7736652e2f1eb9671a22c..5aff94559b1c65d7e32759572d8a7110e711dbda 100755 (executable)
@@ -27,7 +27,7 @@ if [ "${_COOKIE[fakemp4]}" = yes ] && [ "${info##*.}" != mp4 ]; then
 elif [ -n "$foreign" ]; then
   _COOKIE[watch]=server
   videourl="${_GET[url]}"
-  watch_link="${_GET[return]}"
+  watch_link="w=$(urlsafe "${_GET[return]}")"
 elif [ -z "$info" ]; then
   videourl="$(urlsafe "${location#/}")"
 else
@@ -37,7 +37,7 @@ fi
 case "$_COOKIE[watch]" in
   raspi)
     rpiaddr="http://atoemchen.helmchyn.no-ip.biz/?action=watch"
-    redirect "${rpiaddr}&url=$(urlsafe "http://${HTTP_HOST}/${videourl}")&return=$(urlsafe "http://${HTTP_HOST}/?${_POST[page]}")"
+    redirect "${rpiaddr}&url=$(urlsafe "http://${HTTP_HOST}/${videourl}")&return=$(urlsafe "http://${HTTP_HOST}/${_POST[page]}")"
   ;;
   480p)
     [ $height -gt 480 ] && redirect "?action=transcode&i=${linkinfo}&t=480" \
index 28f51cff5005e785d383bfa600606de6ac202ef1..40244a3726a09d6078f26c92a82b362da4e33558 100755 (executable)
@@ -1,4 +1,4 @@
-# Copyright 2014 - 2016 Paul Hänsch
+# Copyright 2014 - 2017 Paul Hänsch
 #
 # This file is part of Serve0
 # 
@@ -29,7 +29,7 @@ cat <<EOF
   </select>
   <!-- input type="submit" name="submit" value="Find" -->
 
-  <a class="panel" href="${info:+?p=list&amp;${page_this}}${directory:+?p=browse&amp;d=${directory}&amp;${page_this}}#$(urlsafe $info)">Dismiss</a>
+  <a class="panel" href="${_GET[w]:-${info:+?p=list&amp;${page_this}}${directory:+?p=browse&amp;d=${directory}&amp;${page_this}}#$(urlsafe $info)}">Dismiss</a>
 </form>
 
 <input type=radio name=topmenu id=btn_playctl><label for=btn_playctl>Audio</label>