Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

client always downloads all torrent files, even those marked with file.deselect() #647

Closed
enorrmann opened this issue Feb 29, 2016 · 2 comments
Closed
Labels

Comments

@enorrmann
Copy link

@enorrmann enorrmann commented Feb 29, 2016

using latest version from jsdelivr CDN, in Firefox 44.0.2

`$scope.simpletest = function(hash){

var torrentId = 'magnet:?xt=urn:btih:'+hash;

client.add(torrentId, function (torrent) {
    torrent.files.forEach(file => file.deselect());
    var file = torrent.files[0];
    file.getBlobURL(function (err, bUrl) {
        console.log(bUrl);
    });
});

}`

this code should donwload only the first file in the torrent, but instead, it downloads all of them
is it something wrong with the code ?

@enorrmann

This comment has been minimized.

Copy link
Author

@enorrmann enorrmann commented Feb 29, 2016

found duplicated issue #164
and solved with torrent._selections = []

@enorrmann enorrmann closed this Feb 29, 2016
@feross feross added the question label Mar 2, 2016
@lock

This comment has been minimized.

Copy link

@lock lock bot commented May 4, 2018

This thread has been automatically locked because it has not had recent activity. To discuss futher, please open a new issue.

@lock lock bot locked as resolved and limited conversation to collaborators May 4, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.