From 5ce9a3f562346b267f93a92200e4cbba3324df59 Mon Sep 17 00:00:00 2001 From: Connor Olding Date: Fri, 11 Dec 2015 01:16:38 -0800 Subject: [PATCH] livestreamer flags --- home/streamcrap | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/home/streamcrap b/home/streamcrap index 943495c..47dd44c 100644 --- a/home/streamcrap +++ b/home/streamcrap @@ -2,7 +2,9 @@ # awful things MPV_STREAM_FLAGS="--quiet --no-sub --no-ytdl --loop=force --cache-initial=1024" -LIVESTREAMER_FLAGS="" +LIVESTREAMER_FLAGS="--player-http --player-continuous-http --default-stream=best" +#LIVESTREAMER_FLAGS+=" --stream-sorting-excludes=>=source" +LIVESTREAMER_FLAGS+=" --player-passthrough=http --player-no-close" _M_STEREO='aformat=channel_layouts=stereo' _M_PRE_EMPH='equalizer=f=50.0:g=-10:width_type=o:w=4,equalizer=f=5000:g=+05:width_type=o:w=4' @@ -34,8 +36,15 @@ fi watchstream() { local url="$1" shift - livestreamer "$url" best "$@" -p mpv $LIVESTREAMER_FLAGS -a \ - "$MPV_STREAM_FLAGS ${2:+--autofit=}${2:-} {filename}" + if [ -n "$ZSH_VERSION" ]; then + # zsh syntax + livestreamer "$url" "$@" -p mpv $=LIVESTREAMER_FLAGS -a \ + "$MPV_STREAM_FLAGS {filename}" + else + # bash syntax + livestreamer "$url" "$@" -p mpv $LIVESTREAMER_FLAGS -a \ + "$MPV_STREAM_FLAGS {filename}" + fi } twitch() {