X-Git-Url: http://git.plutz.net/?p=serve0;a=blobdiff_plain;f=actions%2Fwatch.sh;h=cc47088c0bebc5e73c1b13895a307db1dd51e896;hp=7db9c645db6b1ea6aaf5fd57898effc7e53f36d5;hb=efefeef8289f064b3875b9bae1d1b007f5c1d5f8;hpb=5194cb7ab0b85c39208d94c68ab634e9ee6d9784 diff --git a/actions/watch.sh b/actions/watch.sh index 7db9c64..cc47088 100755 --- a/actions/watch.sh +++ b/actions/watch.sh @@ -2,6 +2,7 @@ cgi_refdata info="${_GET[i]}" +watch="${_GET[w]:-${_COOKIE[watch]}}" location="$(invalidate "${_GET[l]}" '(.*/)?\.\.(/.*)?|' /)" order="${_POST[o]}" search="${_POST[s]}" @@ -33,11 +34,10 @@ else 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" \ @@ -77,13 +77,13 @@ case "${_COOKIE[watch]}" in 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 &