mafintosh / torrent-stream

The low level streaming torrent engine that peerflix uses
MIT License
1.94k stars 226 forks source link

Need API add piece data #88

Closed longdt closed 10 years ago

longdt commented 10 years ago

Hi mafintosh. I tried peerflix and found that it's great. And i switch from libtorrent to use peerflix. But can u implement a api like addPieceData which allows me get data from other sources (eg: http) then this function will write data to the storage as piece

mafintosh commented 10 years ago

engine.store exposes the underlying storage module after ready has been emitted. you can use that (https://github.com/mafintosh/torrent-stream/blob/master/lib/storage.js#L121) to write pieces to the storage