# You should have received a copy of the GNU Affero General Public License
# along with Serve0 If not, see <http://www.gnu.org/licenses/>.
-filter="${_GET[f]}"
-search="${_GET[s]}"
-order=$(validate "${_GET[o]}" 'Name|Date|Length' Name)
-page=$(validate "${_GET[pn]}" '[0-9]+' 1)
+filter="${_POST[f]}"
+search="${_POST[s]}"
+order=$(validate "${_POST[o]}" 'Name|Date|Length' Name)
+page=$(validate "${_POST[pn]}" '[0-9]+' 1)
addtag(){
meta="$1"
cgi_refdata
info="${_GET[i]}"
location="$(invalidate "${_GET[l]}" '(.*/)?\.\.(/.*)?|' /)"
-order="${_REF[o]}"
-search="${_REF[s]}"
-filter="${_REF[f]}"
-page="${_REF[pn]}"
+order="${_POST[o]}"
+search="${_POST[s]}"
+filter="${_POST[f]}"
+page="${_POST[pn]}"
watch_link=''
[ -n "$location" ] && watch_link="l=$(urlsafe "${location}")&"
"${_EXEC}"/helpers/genmeta.sh "$playuri" "$playmeta" >/dev/null
fi
- DISPLAY=:0 XDG_RUNTIME_DIR=/run/user/1006 \
- nohup /usr/bin/mplayer -ao pulse \
+ export DISPLAY=":0"
+ uid="$(id |sed -rn '1s;.*uid=([0-9]+)[^0-9].*;1;p')"
+ export XDG_RUNTIME_DIR="/run/user/$uid" # required for Pulseaudio
+
+ nohup /usr/bin/mplayer -ao pulse \
-slave -input file="$fifofile" \
-volume "$volume" \
"$playuri" >"$statusfile" 2>/dev/null &
# # MPlayer2:
- # DISPLAY=:0 XDG_RUNTIME_DIR=/run/user/1006 \
- # nohup /usr/bin/mplayer -ao pulse --quiet \
+ # nohup /usr/bin/mplayer -ao pulse \
# --slave --input=file="$fifofile" \
# --volume="$volume" \
- # "$playuri" >/dev/null 2>/dev/null &
+ # "$playuri" >"$statusfile" 2>/dev/null &
redirect "?p=playctl&${watch_link}"
;;
tee "$cache" <<VIDEOend
<li class="thumb">
- <a class="watchlink" name="${linkinfo}" href="?action=watch&i=${linkinfo}">
+ <button class="watchlink" name="${linkinfo}" formaction="?action=watch&i=${linkinfo}">
<img src="$thumb" alt="Preview not yet available">
- </a>
+ </button>
<h2>${htmlinfo}</h2>
<input type="checkbox" name="tagsel" value="${htmlinfo}">
#thumblist .thumb img {
width: 100%;
+ margin: 0; padding: 0;
}
#thumblist .thumb h2 {
font-size: 1em;
font-weight: normal;
margin: 0;
}
-#thumblist .thumb a {
+#thumblist .thumb button {
display: block;
-}
-#thumblist .thumb a.alt {
- display: inline-block;
- margin-top: .3em;
+ width: 100%;
+ margin: 0; padding: 0;
+ border: none;
+ line-height: 0;
+ background-color: transparent;
}
#thumblist input {
margin: .75em .5em;
</div>
</form>
- <form action="?action=multitag&${page_this}" method="post" accept-charset="UTF-8">
+ <form action="?action=multitag" method="post" accept-charset="UTF-8">
+ <input type="hidden" name="o" value="${order}">
+ <input type="hidden" name="s" value="${search}">
+ <input type="hidden" name="f" value="${filter}">
+ <input type="hidden" name="pn" value="${page}">
+
<ul id="thumblist">
EOF