• BitTorrent Support

last modified November 2, 2010 by phlax

A product called collective.seed was created in the collective to add torrent download support for plone content



    • Create .torrent for files (perhaps folders/collections?)
    • Upload torrent to tracker sites
    • Seed the file

    ­Creating a torrent

    The basic format for torrent files is:

    {'announce': 'http://bttracker.debian.org:6969/announce'
     'info': {'name': 'debian-503-amd64-CD-1.iso',
              'piece length': 262144,
              'length': 678301696',
              'pieces': '841ae846bc5b6d7bd6e9aa3dd9e551559c82abc1 ... d14f1631d776008f83772ee170c42411618190a4'

    There are a number of other optional keys possible in the main dictionary, including:

    • announce-list
    • creation date
    • created by
    • comment
    • encoding 
    The resulting torrent needs to be bencoded and should have an application/x-bittorrent mimetype.

    Upload torrent to tracker sites

    There does not seem to be one way to do this as different tracker sites have different rules and methods for uploading torrents, and there are a lot of different trackers out there.

    In theory you can use an open tracker by just putting the trackers announce url in the torrent, and seeding it, without having to upload anything or login to a website. However, it seems as though most of the large torrent sites either do not allow open seeding or have done away with trackers altogether in favour of trackerless torrents, using DHT, PEX and magnet links. It is of course possible to use these technologies to distribute files, but use of a tracker will help users to find peers more quickly.

    I think it is outside the scope of this product to upload the torrent to torrent sites, so this is probably something that will have to be done manually for now.

    Running a private tracker is a definite option. There are a number of foss tracker implementations which use different methods to determine the torrents available, such as searching a directory or reading a file containing a list of torrent hashes. It is possible that plone could dump torrents into a directory or update the hash file. In this case it may still be desirable to upload the torrent to a torrent indexing site, to increase exposure of the file beyond the website.

    Seed the file

    It may be possible to implement a bittorrent client inside plone using the async product. This is not a trivial task.

    There are some torrent clients that can run in daemon mode, such as deluge. It may be possible to have plone pass messages to a torrent client to have it start seeding desired files.

    Further information