From: paul Date: Fri, 31 Jul 2015 16:27:51 +0000 (+0000) Subject: introduced local player option in watch preferences X-Git-Url: http://git.plutz.net/?a=commitdiff_plain;h=7bf56bff8e30ea23047422e05d1ef5352ea9cc31;p=serve0 introduced local player option in watch preferences svn path=/trunk/; revision=69 --- diff --git a/actions/preferences.sh b/actions/preferences.sh index 1b76fbc..1552d75 100755 --- a/actions/preferences.sh +++ b/actions/preferences.sh @@ -4,7 +4,7 @@ cgi_post cgi_cookie fakemp4="$(printf %s "${_POST[fakemp4]}" |sed -rn '/^yes$/{p;q};ano' )" -watch="$(printf %s "${_POST[watch]}" |sed -rn '/^(240p|480p|download|raspi|player)$/{p;q};aplayer' )" +watch="$(printf %s "${_POST[watch]}" |sed -rn '/^(240p|480p|download|raspi|player|server)$/{p;q};aplayer' )" debug '== Setting Preferences ==' debug "fakemp4 = $fakemp4" diff --git a/actions/watch.sh b/actions/watch.sh index 8f1a18d..c0cdb37 100755 --- a/actions/watch.sh +++ b/actions/watch.sh @@ -47,6 +47,10 @@ case "${_COOKIE[watch]}" in download) redirect "$videourl" ;; + server) + DISPLAY=:0 nohup /usr/bin/mplayer -ao pulse:jupiter --quiet "${_DATA}/videos/$info" >&- 2>&- & + redirect "$HTTP_REFERER" + ;; *) redirect "?p=view&${watch_link}" ;; esac diff --git a/templates/preferences.html.sh b/templates/preferences.html.sh index bf87ae3..f472142 100755 --- a/templates/preferences.html.sh +++ b/templates/preferences.html.sh @@ -34,6 +34,8 @@ cat <on RaspBerry

+ +