1
0
Fork 0
dotfiles/.local/bin/qndl

13 lines
363 B
Plaintext
Raw Normal View History

2022-07-04 21:36:33 +02:00
#!/bin/sh
# $1 is a url; $2 is a command
[ -z "$1" ] && exit
base="$(basename "$1")"
2022-08-10 17:22:39 +02:00
notify-send "羽Queuing $base..."
2022-07-04 21:36:33 +02:00
cmd="$2"
2023-02-04 22:15:35 +01:00
[ -z "$cmd" ] && cmd="yt-dlp --embed-metadata -ic"
2022-07-04 21:36:33 +02:00
idnum="$(tsp $cmd "$1")"
realname="$(echo "$base" | sed "s/?\(source\|dest\).*//;s/%20/ /g")"
tsp -D "$idnum" mv "$base" "$realname"
2022-08-10 17:22:39 +02:00
tsp -D "$idnum" notify-send " $realname done."