如何将完成的下载放在 aria2c 的目录中?

如何将完成的下载放在 aria2c 的目录中?
alias download='while true; do timeout -s 9 1260 aria2c *.torrent --lowest-speed-limit=1024 --disable-ipv6=true --seed-time=0 --max-connection-per-server=6 --enable-rpc=false; sleep 1; done'
alias seed='aria2c --check-integrity=false --bt-seed-unverified=true --lowest-speed-limit=1024 --disable-ipv6=true --max-connection-per-server=6 -d . *.torrent --seed-time=999999 --seed-ratio=999999.0'

所以我在 aria2 中使用这些别名来下载 torrent 文件。只有 1 个问题:如何将完成的下载放在一个目录中? (使用“下载”别名)

ps:“download”别名中的“while true...”是因为下载“减慢”...过了一会儿,我需要重新启动 aria2c :D

答案1

附注考虑到 BT 的工作方式*,我认为这是一个坏主意,但一个适当的事件挂钩应该做的伎俩:

让我们看一个如何将参数传递给命令的示例:

$ cat hook.sh
#!/bin/sh
echo "Called with [$1] [$2] [$3]"
$ aria2c --on-download-complete hook.sh http://example.org/file.iso
Called with [1] [1] [/path/to/file.iso]

--seed-time--seed-ratio选项也可以自动化许多用例。

*最好检查一下你的设置并在 BitTorrent 上阅读)

相关内容