Downloading torrent files with aria2
aria2 is a nifty command line download manager — similar to, but much more powerful than — wget.
This post is not a review of aria2 (maybe I'll do one some day), rather it focuses on one of its features which has bugged me for a while.
aria2 can — among other things — be used to download torrents. You just pass a torrent file or a URL pointing to one, to aria2c
(the actual name of the binary) and it starts downloading the torrent contents.
But, I use rtorrent to download torrents, and just want to download the .torrent file with aria2. But, since aria2 simply starts downloading the torrent contents instead of just the file, I was forced to use wget for downloading the file.
Even after searching all over the internet, I couldn't find a way to do so with aria2.
Finally, found the solution right under my nose. It was present right there in the man page of aria2.
From man aria2c
:
--follow-torrent=true|false|mem If true or mem is specified, when a file whose suffix is .torrent or content type is application/x-bittorrent is downloaded, aria2 parses it as a torrent file and downloads files mentioned in it. If mem is specified, a torrent file is not written to the disk, but is just kept in memory. If false is specified, the action mentioned above is not taken. Default: true
Unfortunately, the wording is not so clear, maybe I'll offer a fix to the author.
Update - 12 June 2013: My fix was accepted by aria2's author. The man page should now read:
If false is specified, the .torrent file is downloaded to the disk, but is not parsed as a torrent and its contents are not downloaded.
The following text should still be helpful for those who don't like reading man pages.
Anyway, to download a .torrent
file, just use the above switch with the false option, for example:
$ aria2c --follow-torrent=false http://cdimage.debian.org/debian-cd/7.0.0/multi-arch/bt-cd/debian-7.0.0-amd64-i386-netinst.iso.torrent
To avoid passing the switch regularly, just put:
follow-torrent=false
in ~/.aria2/aria2.conf
.
Note: Options present in the configuration file can be overridden by the command line switches.
Comments