Advertisement
J2897

VLC Menu

Nov 10th, 2014
265
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.18 KB | None | 0 0
  1. #!/bin/bash
  2. # Released under the GNU General Public License version 3 by J2897.
  3. # Simple script for controlling VLC via JuiceSSH.
  4.  
  5. clear
  6. PW="temp"
  7. PS3='Please enter your choice: '
  8. options=("Sky News." "Techno4Ever." "Playlist." "End VLC." "Kill all VLC." "Quit.")
  9. select opt in "${options[@]}"
  10. do
  11.     case $opt in
  12.         "Sky News.")
  13.             echo "Launching Sky News..."
  14.             nohup cvlc --intf dummy --extraintf http mms://live2.wm.skynews.servecast.net/skynews_wmlz_audio --http-password "$PW" & echo $! > vlc.pid
  15.             sleep 1s
  16.             ;;
  17.         "Techno4Ever.")
  18.             echo "Launching Techno4Ever..."
  19.             nohup cvlc --intf dummy --extraintf http http://yp.shoutcast.com/sbin/tunein-station.pls?id=373505 --http-password "$PW" & echo $! > vlc.pid
  20.             sleep 1s
  21.             ;;
  22.         "Playlist.")
  23.             echo "Launching a Playlist..."
  24.             nohup cvlc --intf dummy --extraintf http "/home/j2897/VLC/sleep_music.xspf" --http-password "$PW" --loop & echo $! > vlc.pid
  25.             sleep 1s
  26.             ;;
  27.         "End VLC.")
  28.             echo "Ending VLC..."
  29.             kill `cat vlc.pid`
  30.             break
  31.             ;;
  32.         "Kill all VLC.")
  33.             echo "Killing all VLC instances..."
  34.             pidof vlc | xargs kill -9
  35.             break
  36.             ;;
  37.         "Quit.")
  38.             break
  39.             ;;
  40.         *) echo invalid option;;
  41.     esac
  42. done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement