16 lines
305 B
Bash
Executable file
16 lines
305 B
Bash
Executable file
#!/usr/bin/env sh
|
|
|
|
usage () {
|
|
echo "Usage: $(basename "${0}") <username> [<resolution>]"
|
|
echo "Plays a stream from twitch.tv in a local video player."
|
|
exit 1
|
|
}
|
|
|
|
if [ -z "${1}" ]; then
|
|
usage
|
|
fi
|
|
|
|
username="${1}"
|
|
resolution="${2:-"best"}"
|
|
|
|
streamlink "https://twitch.tv/${username}" "${resolution}"
|