rm "${_DATA}"/cache/\?* 2>/dev/null
[ -n "${_POST[tags]}" ] && rm "${_DATA}"/cache/taglist_set "${_DATA}"/cache/taglist_filter 2>/dev/null
-redirect "?o=$order&s=$search&f=$filter&pn=$page"
+#redirect "?o=$order&s=$search&f=$filter&pn=$page"
+redirect "${_POST[page]}"
filter="${_POST[f]}"
page="${_POST[pn]}"
-watch_link=''
+watch_link="${_POST[page]}&"
[ -n "$location" ] && watch_link="l=$(urlsafe "${location}")&"
[ -n "$info" ] && watch_link="i=$(urlsafe "${info}")&"
-[ -n "$order" ] && watch_link="${watch_link}o=${order}&"
-[ -n "$search" ] && watch_link="${watch_link}s=${search}&"
-[ -n "$filter" ] && watch_link="${watch_link}f=${filter}&"
-[ -n "$page" ] && watch_link="${watch_link}pn=${page}"
meta="${_DATA}/meta/$info.meta"
head -n1 "$meta" |read length width height filename
elif [ -n "$foreign" ]; then
_COOKIE[watch]=server
videourl="${_GET[url]}"
+ watch_link="${_POST[return]}"
elif [ -z "$info" ]; then
videourl="$(urlsafe "${location#/}")"
else
case "$_COOKIE[watch]" in
raspi)
- rpiaddr="http://atoemchen.helmchyn.no-ip.biz/?action=watch&url="
- redirect "${rpiaddr}$(urlsafe "http://${HTTP_HOST}/${videourl}")"
+ rpiaddr="http://atoemchen.helmchyn.no-ip.biz/?action=watch"
+ 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" \
# You should have received a copy of the GNU Affero General Public License
# along with Serve0. If not, see <http://www.gnu.org/licenses/>.
+directory="$(invalidate "${_GET[d]}" '(.*/)?\.\.(/.*)?|' /)"
+page_link="p=browse&d=$(urlsafe "$directory")&"
+
. $_EXEC/pages/common.sh
-directory="$(invalidate "${_GET[d]}" '(.*/)?\.\.(/.*)?|' /)"
[ -d "${treeroot%/}${directory%/}/.index" ] && indexed=true || indexed=false
filters="${_GET[f]}"
debug "FILTERS: $filters"
-page_link="p=browse&d=$(urlsafe "$directory")&${page_link}"
-
present_filter(){
printf %s\\n "$*" \
| sed -r 's;(^|!|\^|\|)([^!\^\|:]+:);\1;g;s;\^;\n;g' \
pagesize="${_COOKIE[pagesize]}" #validated
pagecount=0
-page_link=''
-[ -n "$info" ] && page_link="i=$(urlsafe "$info")&"
+#page_link=''
+[ -n "$info" ] && page_link="${page_link}i=$(urlsafe "$info")&"
[ -n "$order" ] && page_link="${page_link}o=${order}&"
[ -n "$search" ] && page_link="${page_link}s=${search}&"
[ -n "$filter" ] && page_link="${page_link}f=${filter}&"
#!/bin/zsh
-# Copyright 2014 - 2016 Paul Hänsch
+# Copyright 2014 - 2017 Paul Hänsch
#
# This file is part of Serve0.
#
# You should have received a copy of the GNU Affero General Public License
# along with Serve0. If not, see <http://www.gnu.org/licenses/>.
+page_link="p=list&"
+
. $_EXEC/pages/common.sh
LF='
</div>
<form action="?action=multitag" method="post" accept-charset="UTF-8">
+ <input type="hidden" name="page" value="?$(attribsafe "${page_this}")">
<input type="hidden" name="o" value="${order}">
<input type="hidden" name="s" value="${search}">
<input type="hidden" name="f" value="${filter}">
</div>
<form action="?action=multitag" method="post" accept-charset="UTF-8">
+ <input type="hidden" name="page" value="?$(attribsafe "${page_this}")">
<input type="hidden" name="o" value="${order}">
<input type="hidden" name="s" value="${search}">
<input type="hidden" name="f" value="${filter}">