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() {