Sunday, December 6, 2009

In the beginning

This project began as a mere shell script that pulled information from transmission-remote to measure torrent performance.

Users set the maximum total size for all torrents, and once that limit is reached, the lowest performing torrents are removed. Torrents can be whitelisted, making them ineligible for deletion, and a minimum seeding duration can be set to ensure the performance averages are accurate.

The benefits of this tool are:

1. Efficient distribution of seeders. Additional seeders on popular torrents upload very little, their disk space is better used on 'rarer' files. By measuring torrent performance as ratio/time (total uploaded / size / time seeded), users only seed torrents that need seeders. This will increase torrent life, and user upload.

The new version add functionality to the current shell script and can be used by clients other than Transmission, so long as somebody develops the software to export from their client of choice.

First, torrent meta information is stored in a mysql table:
1. torrent name
2. hash
3. format
4. bitrate
5. torrent creation date (not the date the torrent was added)
6. date deleted
7. whitelisted (Y/N)
8. converted to other format (Y/N)
9. size
10. location on drive

Each torrent is also given an ID number (because hashes are not human friendly).
This ID links the torrent to another table where the amount uploaded and downloaded is recorded for each day.

Enough about data storage, what can we do?

Assuming your drive is maxed out (or whatever size limit you've set)
torrentPrune will look for the lowest X% performing torrents and delete those that are eligible, then it will add new torrents from a specified directory in their place.

You can also schedule a script to run after a torrent completes. For instance, if the added torrent is FLAC, then you can automatically convert it to V0 and create a new torrent once finished.

That is the core functionality, automating the management of your torrents. There will also be a web interface for manual deletion, setting whitelist status, etc.

There are many possibilities beyond this main objective. sql driven media management, etc

No comments:

Post a Comment