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 \
+ # nohup /usr/bin/mplayer \
# -slave -input file="$fifofile" \
# -volume "$volume" \
# "$playuri" >"$statusfile" 2>/dev/null &
# MPlayer2: (statusline on stderr)
- nohup /usr/bin/mplayer -ao pulse \
+ nohup /usr/bin/mplayer \
--slave --input=file="$fifofile" \
--volume="$volume" \
"$playuri" 2>"$statusfile" >/dev/null &
debug VIDEO: $video
pa_sinks(){
- export DISPLAY=":0"
- export XDG_RUNTIME_DIR="/run/user/$(id |sed -rn '1s;.*uid=([0-9]+)[^0-9].*;\1;p')"
+ if which pactl >/dev/null; then
+ export DISPLAY=":0"
+ export XDG_RUNTIME_DIR="/run/user/$(id |sed -rn '1s;.*uid=([0-9]+)[^0-9].*;\1;p')"
- pactl list sinks \
- | sed -rn '/Sink #/{:X;N;/Description: /!bX;s;Sink #([0-9]+).+Description: (.*);\1 \2;p}'
+ pactl list sinks \
+ | sed -rn '/Sink #/{:X;N;/Description: /!bX;s;Sink #([0-9]+).+Description: (.*);\1 \2;p}'
+ fi
}
printf 'Refresh: 1\r\n'