I’m making a program that keeps track of local files and stores a hash for those files. The program will have a crowdsourced database. What would be the simplest way to seed those files?
I have to look ahead and think of a way to give preference to files with many leeches and zero seeders. If I just try to seed all tracked files the computers running this program will probably implode.
The options I’ve thought about are:
- Automatically create a torrent for each file and add the torrent file to the database. I don’t think this is a good idea because there would be too many torrents. Besides if someone tracks a private file it would be shared, and I only want to share files already being shared.
- Implement something like magnetico to crawl for torrent files. Then the files would be seeded for each torrent that contains them.
- Allow users to add magnet strings to files in the database. Then files with a magnet would be seeded for each of the linked torrents. Torrent files would be created with a fork of Magnet2Torrent in the appropriate language.
The problem is I don’t know how to figure out the number of seeders and leechers with any of this options.
The start/end of each file would be a problem - I think hashed chunks are a specified size, and the start of one file typically shares a chunk with the end of another file. If you don’t have both files in that chunk you can’t supply that valid chunk thus can’t provide that end of the file.
Still, it might be possible, as a way to increase the health of a low but not zero health torrent.