downloads with default file if no name given

This commit is contained in:
Alexander Bocken 2021-01-12 19:03:18 +01:00
parent 1b13b44699
commit 121d2d4225
Signed by: Alexander
GPG Key ID: 1D237BE83F9B05E8

View File

@ -7,6 +7,7 @@ case "$(printf "mpv\\ncopy url\\nqueue download\\nqueue youtube-dl\\nbrowser\\nr
mpv) setsid mpv --quiet --ytdl-format='bestvideo[height<=1080]+bestaudio/best[height<=1080]' "$1" & ;;
"mpv (loop)") setsid mpv --input-ipc-server=/tmp/mpvsoc$(date +%s) -quiet --loop "$1" >/dev/null 2>&1 & ;;
"queue download") name="$( dmenuinput 'Name for file:' )"
[ -z "$name" ] && tsp curl -C - -LO "$1" >/dev/null 2>&1
tsp curl -C - -L -o $name "$1" >/dev/null 2>&1 ;;
"queue youtube-dl") youtube-dl --add-metadata -i -o $HOME/'%(upload_date)s-%(title)s.%(ext)s' "$1" >/dev/null 2>&1;;
cast) setsid $TERMINAL -e mkchromecast -y $1 --video --control