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

Support for file selection (aka partial downloads) #69

Open
atomashpolskiy opened this issue Feb 21, 2018 · 1 comment
Open

Support for file selection (aka partial downloads) #69

atomashpolskiy opened this issue Feb 21, 2018 · 1 comment
Labels
Milestone

Comments

@atomashpolskiy
Copy link
Owner

atomashpolskiy commented Feb 21, 2018

I've just added the support for partial downloads in master, so it goes into 1.7 release. There are a few issues remaining to be solved and things to be done:

  • I've noticed that sometimes CLI does not terminate when all non-skipped files have been downloaded. This had never happened before, so I tend to think that I've introduced a bug somewhere. Need to investigate (might start with bt.processor.torrent.ProcessTorrentStage#doExecute, which controls when download is considered finished). Maybe it's a CLI-specific issue (it's hard to say b/c there aren't any integration tests for partial downloads yet).
  • Adding a couple of unit tests for new methods in bt.data.Bitfield would be nice
  • CLI client might need an additional command-line flag to disable file selection (otherwise people may be forced to keep Enter/Esc pressed for quite some time if there are many files in the torrent)
  • Displaying selection prompt for an existing file (e.g. when it's not the first session for current torrent) makes little sense
  • Esc keypress does not work in headless mode
  • Ctrl-C keypress does not work in file selection dialog when run with GUI
  • Might want to update the gif in the README to show off the new feature (looks pretty cool!)
@atomashpolskiy atomashpolskiy added this to the 1.7 milestone Feb 21, 2018
@atomashpolskiy
Copy link
Owner Author

atomashpolskiy commented Feb 21, 2018

Also, current implementation does not account for some edge cases:

  • Empty files are always created by bt.data.DefaultDataDescriptor, regardless of whether they've been selected or not
  • Selection is performed on raw torrent file metadata (i.e. the paths from the info dictionary). Would be great to use normalized file info instead (currently normalization is done in bt.data.file.FileSystemStorage)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant