qndl (365B)
1 #!/bin/sh 2 3 # $1 is a url; $2 is a command 4 [ -z "$1" ] && exit 5 base="$(basename "$1")" 6 notify-send "⏳ Queuing $base..." 7 cmd="$2" 8 [ -z "$cmd" ] && cmd="yt-dlp --embed-metadata -ic" 9 idnum="$(tsp $cmd "$1")" 10 realname="$(echo "$base" | sed "s/?\(source\|dest\).*//;s/%20/ /g")" 11 tsp -D "$idnum" mv "$base" "$realname" 12 tsp -D "$idnum" notify-send "👍 $realname done."