Skip to content

Downloading Whole Torrent. #111

@arch-linux

Description

@arch-linux

Hello,
This module seems to be the best fit, but i can't seem to get it to function properly at all.
For the record, I am trying to use this as a torrent downloader, so it will write the torrent to a file..

var torrentStream = require('torrent-stream');

var engine = torrentStream('magnent here');

engine.on('ready', function() {
engine.files.forEach(function(file) {
if(file.name == "filename here.") {
var stream = file.createReadStream();
}
});
});

How can i make this code download all of the files in the torrent, and save them to the disk?

Thank you!

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions