26 lines
439 B
Bash
Executable file
26 lines
439 B
Bash
Executable file
#!/bin/bash
|
|
#
|
|
# SCRIPT NAME:
|
|
# twitch.sh
|
|
#
|
|
# AUTHOR:
|
|
# Severin Kaderli <severin.kaderli@gmail.com>
|
|
#
|
|
# DESCRIPTION:
|
|
# This script loads a Twitch livestream in a local video player
|
|
# using streamlink.
|
|
#
|
|
# USAGE:
|
|
# ./twitch.sh USERNAME [RESOLUTION]
|
|
if [[ -z $1 ]]; then
|
|
echo "Please enter a username!"
|
|
exit 1
|
|
fi
|
|
|
|
if [[ -z $2 ]]; then
|
|
resolution="best"
|
|
else
|
|
resolution="${2}"
|
|
fi
|
|
|
|
streamlink "https://twitch.tv/${1}" "${resolution}"
|