-s / --select flag is broken
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 --versionit is v16.11.1 - according to
npm --versionit 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.
Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward?
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.
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.
it would be cool if this was fixed