[NEW] dl: Add aria2c-based torrent downloading script

This commit is contained in:
Andrew Rogers 2023-06-29 12:46:54 -05:00
commit 5f14bd2d2f

34
scripts/dl Normal file
View file

@ -0,0 +1,34 @@
#!/usr/bin/env bash
: '
* Download torrents that make you go NYAA.
'
. "$(dirname $0)/util/logging.bash"
read -d '' usage <<EOUSAGE
Usage: $0 [-h] MAGNET_URI|TORRENT_FILE ... MAGNET_URI|TORRENT_FILE
OPTIONS
-h Display this help.
EOUSAGE
while getopts 'h' opt; do
case "${opt}" in
h)
excat "$usage"
;;
esac
done
shift $((OPTIND-1))
aria2c \
--check-integrity=true \
--continue=true \
--bt-save-metadata=true \
--bt-max-peers=1000 \
--bt-force-encryption=true \
--seed-ratio=0.0 \
${@} \
;