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

Pause download of some files within the torrent, But still downloads #857

Closed
krisgopal128 opened this issue Jul 9, 2016 · 5 comments
Closed
Labels

Comments

@krisgopal128
Copy link

@krisgopal128 krisgopal128 commented Jul 9, 2016

  • WebTorrent version: 0.8.1 (Windows)

Even after pausing the some file within the torrent. The paused file still continues to download.
I tried multiple torrents, but same issue pops up

@feross

This comment has been minimized.

Copy link
Member

@feross feross commented Jul 27, 2016

You need to first run:

// Remove default selection (whole torrent)
torrent.deselect(0, torrent.pieces.length - 1, false)

Then you can select just the files you want:

torrent.files[0].select() // download the 1st file
torrent.files[5].select() // download the 6th file

// ... and do not download any of the other files
@feross feross added the question label Jul 27, 2016
@feross feross closed this Jul 27, 2016
@romaincointepas

This comment has been minimized.

Copy link

@romaincointepas romaincointepas commented Jul 28, 2016

@feross What is the earliest time torrent.deselect() can be called? (to avoid downloading pieces and creating the files on disk). (After metadata or ready event?)

@feross

This comment has been minimized.

Copy link
Member

@feross feross commented Jul 28, 2016

Right now, you have to call it after the ready event. But I'm going to fix that so it can be called earlier, after the metadata event.

@feross

This comment has been minimized.

Copy link
Member

@feross feross commented Jul 28, 2016

Released as 0.95.6.

feross added a commit that referenced this issue Jul 28, 2016
// Remove default selection (whole torrent)
torrent.deselect(0, torrent.pieces.length - 1, false)

Can now be called earlier, after 'metadata' instead of after 'ready'

#857 (comment)
@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
3 participants
You can’t perform that action at this time.