queue fix

This commit is contained in:
Luke Smith 2018-12-11 16:12:41 -05:00
parent a3e25517da
commit 2ef3182b2f

View file

@ -9,8 +9,10 @@ while read -r line; do
url="$(echo "$line" | awk '{print $1}')"
base="$(basename "$url")"
notify-send -i "$PIX/dl.png" "Queuing $base..."
idnum="$(tsp curl -LO "$url" && mv "$base" "$(echo "$base" | sed "s/?\(source\|dest\).*//")")"
tsp -D "$idnum" notify-send -i "$PIX/check.png" "$base done."
idnum="$(tsp curl -LO "$url")"
realname="$(echo "$base" | sed "s/?\(source\|dest\).*//;s/%20/ /g")"
tsp -D "$idnum" mv "$base" "$realname"
tsp -D "$idnum" notify-send -i "$PIX/check.png" "$realname done."
done < "$queuefile"
echo > "$queuefile"