]> git.plutz.net Git - serve0/commitdiff
introduced local player option in watch preferences
authorpaul <paul@plutz.net>
Fri, 31 Jul 2015 16:27:51 +0000 (16:27 +0000)
committerpaul <paul@plutz.net>
Fri, 31 Jul 2015 16:27:51 +0000 (16:27 +0000)
svn path=/trunk/; revision=69

actions/preferences.sh
actions/watch.sh
templates/preferences.html.sh

index 1b76fbcac3aa13b6b399930f84f1f2269e77b732..1552d756326c60258f3d9a0a7d16330ffb6ff32b 100755 (executable)
@@ -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"
index 8f1a18d272a04ad3e22fb291e805bcf8a33f379a..c0cdb377c8904d5849335fbdf4b4c834f34f8054 100755 (executable)
@@ -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
index bf87ae39ce44258ce232913e3f1d68629816b6b5..f472142b5203cdebbba690b25b1a1c4d1da6e8a6 100755 (executable)
@@ -34,6 +34,8 @@ cat <<EOF
     <label for="rd_wrasp">on RaspBerry</label><br>
     <input type="radio" name="watch" value="player"   $([ "${_COOKIE[watch]}" = player   ] && printf 'checked') id="rd_wplay">
     <label for="rd_wplay">in embedded player</label><br>
+    <input type="radio" name="watch" value="server"   $([ "${_COOKIE[watch]}" = server   ] && printf 'checked') id="rd_wserv">
+    <label for="rd_wserv">on screen connected to server</label><br>
 
     <input type="submit" value="Set Cookie!">
   </form>