mpetazzoni / ttorrent

BitTorrent Java library with tracker and download client
http://mpetazzoni.github.com/ttorrent/
Apache License 2.0
1.38k stars 502 forks source link

support for webseeds in torrent creation #239

Closed fireduck64 closed 5 years ago

fireduck64 commented 5 years ago

It would be helpful to be able to specify a web seed when creating a new torrent file with MetadataBuilder.

It would also be nice if I could hand in file info in the form of path, length and a list of sha1 hashes but that is kinda special to my needs. I never actually have all the files on disk or in memory at once and reading from the streams is kinda expensive, so I like to do that only once. Gathering the sha1 hashes every x bytes is easy though. But anyways, not a big deal, I can work around that one.

Dead-off commented 5 years ago

can you link please specification about "web seed in torrent file"? I don't know what is it

fireduck64 commented 5 years ago

Sorry, I should have included it.

http://bittorrent.org/beps/bep_0019.html

Dead-off commented 5 years ago

i added setFilesInfo method for creating metadata from hashes https://github.com/mpetazzoni/ttorrent/commit/35b2303d038228c8cbb23336e0da608125ebaa62 try to use it