webtorrent-cli icon indicating copy to clipboard operation
webtorrent-cli copied to clipboard

-s / --select flag is broken

Open noahvogt opened this issue 3 years ago • 4 comments

What version of this package are you using? according to webtorrent --version it is 4.0.2 (1.6.0)

What operating system, Node.js, and npm version?

  • OS: Linux
  • according to node --version it is v16.11.1
  • according to npm --version it is 8.1.3

What happened? When executing webtorrent [magnet link] -s 13 I tried to select and download the file corresponding to index 13. But instead, this error came up after showing verifying existing torrent data... and before the download started. The problem is, whenever I enter a index higher than 10 to the -s / --select flag, webtorrent instead downloads the file corresponing to index number 1.

node:9799) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 ready listeners
added to [Torrent]. Use emitter.setMaxListeners() to increase limit
(Use `node --trace-warnings ...` to show where the warning was created)

What did you expect to happen? I didn't expect that webtorrent start downloading file index 1 instead of file number 13 when i specified -s 13.

Are you willing to submit a pull request to fix this bug? No, since I have zero experience with Node and as of now couldn't really be beneficial to this project in contributing code.

noahvogt avatar Jan 22 '22 00:01 noahvogt

Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward?

github-actions[bot] avatar Mar 23 '22 12:03 github-actions[bot]

Yes, it is still relevant, as this issue has not yet been resolved. And no, I cannot really help as I don't know anything about the codebase of this project.

noahvogt avatar Mar 23 '22 17:03 noahvogt

Actually, the select function itself is pretty useless as of now. As per #152, #250, etc. If you use this function & stream media for an extensive period, webtorrent will literally download everything in the background instead of selected ones.

ghost avatar Oct 11 '22 00:10 ghost

it would be cool if this was fixed

glottisfaun0000 avatar May 02 '23 04:05 glottisfaun0000