cgi_refdata
info="${_GET[i]}"
+watch="${_GET[w]:-${_COOKIE[watch]}}"
location="$(invalidate "${_GET[l]}" '(.*/)?\.\.(/.*)?|' /)"
order="${_POST[o]}"
search="${_POST[s]}"
videourl="$(urlsafe "videos/$info")"
fi
-case "${_COOKIE[watch]}" in
+case "$watch" in
raspi)
- rpiaddr="http://pfostenpanne.helmchyn.no-ip.biz/?player=play&path="
- [ $height -gt 480 -a $width -gt 480 ] && redirect "${rpiaddr}$(urlsafe "http://jupiter:8000/?action=transcode&i=${linkinfo}&t=480")" \
- || redirect "${rpiaddr}$(urlsafe "http://jupiter:8000/${videourl}")"
+ rpiaddr="http://atoemchen.helmchyn.no-ip.biz/?action=watch&w=server&i="
+ redirect "${rpiaddr}$(urlsafe "http://jupiter:8000/${videourl}")"
;;
480p)
[ $height -gt 480 ] && redirect "?action=transcode&i=${linkinfo}&t=480" \
export XDG_RUNTIME_DIR="/run/user/$uid" # required for Pulseaudio
xrandr >/dev/null # helps enable all screens
- nohup /usr/bin/mplayer -ao pulse \
- -slave -input file="$fifofile" \
- -volume "$volume" \
- "$playuri" >"$statusfile" 2>/dev/null &
-
- # # MPlayer2:
- # nohup /usr/bin/mplayer -ao pulse \
- # --slave --input=file="$fifofile" \
- # --volume="$volume" \
+ # nohup /usr/bin/mplayer \
+ # -slave -input file="$fifofile" \
+ # -volume "$volume" \
# "$playuri" >"$statusfile" 2>/dev/null &
+ # MPlayer2: (statusline on stderr)
+ nohup /usr/bin/mplayer \
+ --slave --input=file="$fifofile" \
+ --volume="$volume" \
+ "$playuri" 2>"$statusfile" >/dev/null &
+
chmod 600 "$statusfile"
redirect "?p=playctl&${watch_link}"