Add suport for aria2c for faster downloading if installed (#299)

* Add suport for aria2c for faster downloading if installed

* Fix newlines in aria2c output
pull/349/head
Jai A P 3 years ago committed by GitHub
parent bb6b4fe597
commit 4c85cf5596
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 15
      quickget

@ -552,9 +552,18 @@ function web_get() {
exit 1 exit 1
fi fi
if ! wget --quiet --continue --show-progress --progress=bar:force:noscroll "${URL}" -O "${DIR}/${FILE}"; then if command -v aria2c > /dev/null; then
echo "ERROR! Failed to download ${URL}. Try running 'quickget' again." if ! aria2c -x16 --continue=true --summary-interval=0 --download-result=hide --console-log-level=error "${URL}" -o "${DIR}/${FILE}"; then
exit 1 echo #Necessary as aria2c in suppressed mode doesnot have new lines
echo "ERROR! Failed to download ${URL}. Try running 'quickget' again."
exit 1
fi
echo #Necessary as aria2c in suppressed mode doesnot have new lines
else
if ! wget --quiet --continue --show-progress --progress=bar:force:noscroll "${URL}" -O "${DIR}/${FILE}"; then
echo "ERROR! Failed to download ${URL}. Try running 'quickget' again."
exit 1
fi
fi fi
} }

Loading…
Cancel
Save