Skip to content

fix: -s / --select not working#304

Merged
SilentBot1 merged 2 commits intomasterfrom
fix/select-only
Jun 2, 2024
Merged

fix: -s / --select not working#304
SilentBot1 merged 2 commits intomasterfrom
fix/select-only

Conversation

@SilentBot1
Copy link
Copy Markdown
Member

@SilentBot1 SilentBot1 commented Jun 2, 2024

What is the purpose of this pull request? (put an "X" next to item)

[ ] Documentation update
[x] Bug fix
[ ] New feature
[ ] Other, please explain:

What changes did you make? (Give an overview)

This PR fixes where -s / --select does not work as expected, leading to all files being downloaded, rather than the selected. This is done by moving where the torrent.so is defined, as this must occur before metadata to ensure reservations aren't made.

Note: This PR does not address the issue that if a piece contains more than just the selected file, it will still be created. e.g. in the Sintel torrent --select 0 will include the first 5 subtitles and the first 121KB of the .mp4 due to the first piece containing all of this data.

Which issue (if any) does this pull request address?
-fixes: #222

Is there anything you'd like reviewers to focus on?

Copy link
Copy Markdown
Member

@ThaUnknown ThaUnknown left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@ThaUnknown ThaUnknown changed the title FIX: -s / --select not working fix: -s / --select not working Jun 2, 2024
@SilentBot1 SilentBot1 merged commit 825b0ee into master Jun 2, 2024
@SilentBot1 SilentBot1 deleted the fix/select-only branch June 2, 2024 15:35
webtorrent-bot pushed a commit that referenced this pull request Jun 2, 2024
## [5.0.1](v5.0.0...v5.0.1) (2024-06-02)

### Bug Fixes

* -s / --select not working ([#304](#304)) ([825b0ee](825b0ee))
@webtorrent-bot
Copy link
Copy Markdown

🎉 This PR is included in version 5.0.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

-s / --select flag is broken

3 participants