feat(download): implement selective file download for multi-file torrents#39
Closed
arjavlamsal wants to merge 1 commit into
Closed
feat(download): implement selective file download for multi-file torrents#39arjavlamsal wants to merge 1 commit into
arjavlamsal wants to merge 1 commit into
Conversation
…ents Multi-file torrents currently download everything, wasting bandwidth and disk space when the user only wants specific files. This adds an inline file-selection checklist in the search results detail view so users can pick exactly which files to grab before starting the download. - Engine: applyFileSelection deselects unwanted files at the piece level; per-file progress tracking; selective totalBytes computation. - Queue: add() accepts selectedIndices; onMetadata applies selection and recalculates size; cleanUnwanted relocates deselected piece data to a hidden .unwanted/ directory on completion. - Detail view: temporary metadata-only fetch populates the file list without committing to a download; auto-cleanup on navigation away. - Keys: space toggle, a all, n none (registered in HELP_GROUPS). - Display paths strip the torrent root folder prefix for readability.
|
so is it good and trusted |
Author
The logic itself is solid and clean, it passes all the local tests, has typechecking enabled, and includes dedicated new unit tests for the selective download queuing. I've been trying it out and haven't had any issue. |
This was referenced Jul 3, 2026
|
This is great! Tested locally and then i added file path input per torrent on top of this: #43 |
Author
|
Closing this since @sloevhaug has cleanly integrated this logic and resolved the conflicts over in #43 . Thanks for the awesome collab! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What and why
Multi-file torrents currently download all containing files, wasting bandwidth and disk space when the user only wants specific files. This adds an inline file-selection checklist in the search results detail view so users can pick exactly which files to grab before starting the download.
applyFileSelectiondeselects unwanted files at the piece level; added per-file progress tracking and selectivetotalBytescalculation.add()acceptsselectedIndices;onMetadataapplies selection and recalculates size;cleanUnwantedrelocates deselected piece data to a hidden.unwanted/directory on completion.spacetoggle ·aall ·nnone (all registered inHELP_GROUPScheatsheet).Checklist
npm run typecheckis cleannpm testpassesqueue.test.tscoversselectedIndicesand metadata recalculations)HELP_GROUPSandfooterHintsinsrc/ui/keymap.tsStorefields were added (reused existingstartDownloadconfiguration)node:fs/node:path)feat(download): ...)