|
|
@ -100,9 +100,28 @@ shuffle() { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
stream() { |
|
|
|
stream() { |
|
|
|
QUALITY=${2:-"720p"} |
|
|
|
channel="$1" |
|
|
|
|
|
|
|
quality=${2:-"best"} |
|
|
|
streamlink --player mpv "https://twitch.tv/$1" "$QUALITY" > /dev/null 2>&1 & |
|
|
|
lowLatency="$3" |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if [ "$quality" = "list" ]; then |
|
|
|
|
|
|
|
streamlink "https://twitch.tv/$1" --config "/dev/null" |
|
|
|
|
|
|
|
elif [ "$quality" != "low" ] && [ -z "$lowLatency" ]; then |
|
|
|
|
|
|
|
echo "Starting stream https://twitch.tv/$channel at quality: $quality" |
|
|
|
|
|
|
|
setsid -f streamlink \ |
|
|
|
|
|
|
|
--player mpv \ |
|
|
|
|
|
|
|
--stream-sorting-excludes "<480p,>=1080p" \ |
|
|
|
|
|
|
|
"https://twitch.tv/$channel" "$quality" > /dev/null 2>&1 & |
|
|
|
|
|
|
|
else |
|
|
|
|
|
|
|
[ "$quality" = "low" ] && quality="best" |
|
|
|
|
|
|
|
echo "Starting stream https://twitch.tv/$channel at quality: $quality" |
|
|
|
|
|
|
|
setsid -f streamlink \ |
|
|
|
|
|
|
|
--twitch-low-latency \ |
|
|
|
|
|
|
|
--player mpv \ |
|
|
|
|
|
|
|
--player-args '--cache=yes --demuxer-max-bytes=750k' \ |
|
|
|
|
|
|
|
--stream-sorting-excludes "<480p,>=1080p" \ |
|
|
|
|
|
|
|
"https://twitch.tv/$channel" "$quality" > /dev/null 2>&1 & |
|
|
|
|
|
|
|
fi |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
update_mirrorlist() { |
|
|
|
update_mirrorlist() { |
|
|
|