No frikin tables...
Friday 30th 2010f July 2010 01:25:30 PM

Bittorrent Multi Downloader

This is a script i use to start multiple bittorrent downloads.
Basicly i've edited the btdownloadcurses.py file so that it exits after a complete download. Then this script runs many downloads one after the other, so that multiple downloads is possible, without any intervention.
I must say it works very well. It keeps a log and appends the torrent files with .OLD so that it does not get redownloaded.
There is also some nice colourful outputs, just to complete the whole script :)
I have included the btdownloadcurses.py file too, so that people can see what i did.
Just make sure the finished method looks like this:
def finished(self):
self.done = 1
self.activity = 'download succeeded!'
mainkillflag.set()
self.downRate = '%s/s down' % (fmtsize(0))
self.display({'fractionDone': 1})

The important part of the code above is:
mainkillflag.set()

which basicly exits the download.

The script is very easy to use:
$ btdir .

will download using all the torrent in the current directory.
$ btdir ./Download

This will use all the torrents from ~/Download.
btdir.sh View Download
btdownloadcurses.py View Download