2020-02-08 23:43:37 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
2019-01-20 22:39:03 +00:00
|
|
|
# $1 is a url; $2 is a command
|
|
|
|
[ -z "$1" ] && exit
|
|
|
|
base="$(basename "$1")"
|
2019-02-22 21:39:58 +00:00
|
|
|
notify-send "⏳ Queuing $base..."
|
2019-01-20 22:39:03 +00:00
|
|
|
cmd="$2"
|
|
|
|
[ -z "$cmd" ] && cmd="youtube-dl --add-metadata"
|
|
|
|
idnum="$(tsp $cmd "$1")"
|
|
|
|
realname="$(echo "$base" | sed "s/?\(source\|dest\).*//;s/%20/ /g")"
|
|
|
|
tsp -D "$idnum" mv "$base" "$realname"
|
2019-02-22 21:39:58 +00:00
|
|
|
tsp -D "$idnum" notify-send "👍 $realname done."
|