dotfiles/system/bin/twitch.sh
Severin Kaderli e405bbcd89 Comment the scripts in system/bin
Signed-off-by: Severin Kaderli <severin.kaderli@gmail.com>
2018-12-13 21:54:40 +01:00

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}"