These are chat archives for anacrolix/torrent

Mar 2017
Chris Walker
Mar 14 2017 15:41
@anacrolix - firstly, awesome library! I first came across it via cloud-torrent. Now I am writing my own application in which I want to store the data for each torrent in a directory named after the infohash. It looks like this should be possible with having to copypasta the whole storage folder but I am struggling. 1) there is a mention of TorrentDataOpener in the Client docs which sounds about right, but there is no other reference in code. 2) there is a Storage field on the Spec struct, but it doesn't look like it is actually used.
I though about re-using the File storage implementation, but because it is all private except the NewFile I cannot reuse the "sub" Interfaces for TorrentImpl and PieceImpl without copying the whole folder.
I can see roughly how to get the Spec#Storage field to be honored in Client#AddTorrentSpec but I don't know whether this is something that was just overlooked/could be fixed in a better way/etc...