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. 9
      quickget

@ -552,10 +552,19 @@ function web_get() {
exit 1
fi
if command -v aria2c > /dev/null; then
if ! aria2c -x16 --continue=true --summary-interval=0 --download-result=hide --console-log-level=error "${URL}" -o "${DIR}/${FILE}"; then
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
}
function zsync_get() {

Loading…
Cancel
Save