|
|
@ -101,30 +101,31 @@ shuffle() { |
|
|
|
|
|
|
|
|
|
|
|
stream() { |
|
|
|
stream() { |
|
|
|
channel="$1" |
|
|
|
channel="$1" |
|
|
|
quality=${2:-"best"} |
|
|
|
quality="$2" |
|
|
|
lowLatency="$3" |
|
|
|
lowLatency="$3" |
|
|
|
|
|
|
|
|
|
|
|
if [ "$quality" = "list" ]; then |
|
|
|
if [ -z "$quality" ]; then |
|
|
|
streamlink "https://twitch.tv/$1" --config "/dev/null" |
|
|
|
streamlink --quiet --config "/dev/null" "https://twitch.tv/$1" |
|
|
|
elif [ "$quality" != "low" ] && [ -z "$lowLatency" ]; then |
|
|
|
printf "Select stream quality: " |
|
|
|
echo "Starting stream https://twitch.tv/$channel at quality: $quality" |
|
|
|
read -r quality |
|
|
|
setsid -f streamlink \ |
|
|
|
fi |
|
|
|
--player mpv \ |
|
|
|
|
|
|
|
--stream-sorting-excludes "<480p,>=1080p" \ |
|
|
|
if [ -n "$lowLatency" ]; then |
|
|
|
"https://twitch.tv/$channel" "$quality" > /dev/null 2>&1 & |
|
|
|
arguments="\ |
|
|
|
else |
|
|
|
|
|
|
|
[ "$quality" = "low" ] && quality="best" |
|
|
|
|
|
|
|
echo "Starting stream https://twitch.tv/$channel at quality: $quality" |
|
|
|
|
|
|
|
setsid -f streamlink \ |
|
|
|
|
|
|
|
--twitch-low-latency \ |
|
|
|
--twitch-low-latency \ |
|
|
|
--twitch-disable-ads \ |
|
|
|
--player-args '--cache=yes --demuxer-max-bytes=750k' \ |
|
|
|
|
|
|
|
" |
|
|
|
|
|
|
|
fi |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
echo "Starting stream https://twitch.tv/$channel @ $quality" |
|
|
|
|
|
|
|
command="setsid -f streamlink \ |
|
|
|
--twitch-disable-hosting \ |
|
|
|
--twitch-disable-hosting \ |
|
|
|
--twitch-disable-reruns \ |
|
|
|
--twitch-disable-reruns \ |
|
|
|
--player mpv \ |
|
|
|
--player mpv \ |
|
|
|
--player-args '--cache=yes --demuxer-max-bytes=750k' \ |
|
|
|
--stream-sorting-excludes '<480p,>=1080p' \ |
|
|
|
--stream-sorting-excludes "<480p,>=1080p" \ |
|
|
|
$arguments \ |
|
|
|
"https://twitch.tv/$channel" "$quality" > /dev/null 2>&1 & |
|
|
|
https://twitch.tv/$channel $quality > /dev/null 2>&1" |
|
|
|
fi |
|
|
|
eval "$command" |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
update_mirrorlist() { |
|
|
|
update_mirrorlist() { |
|
|
|