Last active
March 10, 2016 14:01
-
-
Save indeedwatson/2b421a33ac476c9d4a6d to your computer and use it in GitHub Desktop.
script for opening livestreamer with shortcuts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
twitch=http://www.twitch.tv/ | |
mpv=--player=mpv | |
case "$1" in | |
santzo) channel=santzo84;; | |
ohn) channel=outerheaven;; | |
prec) channel=previouslyrecorded_live;; | |
esac | |
case "${2:-b}" in | |
b*) quality=best;; | |
l*) quality=low;; | |
m*) quality=medium;; | |
*) | |
printf '%s: unkown quality option: %s (one of [l]ow, | |
[m]edium, [b]est)'"$0" "$2" >&2 | |
exit 1 | |
;; | |
esac | |
livestreamer $twitch$1$2 $mpv |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment