Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- _twitch=('twitch' 'twitch.tv/')
- _hitbox=('hitbox''hitbox.tv/')
- _mlg=('mlg' 'mlg.tv/')
- _chaturbate=('chaturbate' 'chaturbate.com/')
- _dailymotion=('dailymotion' 'dailymotion.com/')
- _ustream=('ustream' 'ustream.tv/')
- _quality=('audio' 'high' 'low' 'medium' 'mobile' 'worst' 'source' 'best')
- _service=''
- if [ $# = 3 ]; then
- case $1 in
- ${_twitch[0]}) _service=${_twitch[1]}
- ;;
- ${_hitbox[0]}) _service={_hitbox[1]}
- ;;
- ${_mlg[0]}) _service=${_mlg[1]}
- ;;
- ${_chaturbate[0]}) _service=${_chaturbate[1]}
- ;;
- ${_dailymotion[0]}) _service=${_dailymotion[1]}
- ;;
- ${_ustream[0]}) _service=${_ustream[1]}
- ;;
- *) echo 'Wrong service name'
- ;;
- esac
- for i in "${_quality[@]}"
- do
- if [ $3 = $i ]; then
- nohup livestreamer -p baka-mplayer $_service$2 $3 &>/dev/null &
- exit 0
- fi
- done
- echo 'Choose a valid quality.'
- exit 1
- fi
Add Comment
Please, Sign In to add comment