mirror of
https://github.com/baairon/torlink.git
synced 2026-07-08 18:28:22 +02:00
feat: pick a folder per download with D (#54)
The o key sets one global download folder, so routing a single result somewhere else (a movie to the NAS, a game to the big drive) meant changing the setting and changing it back. D on a result now opens a "download to" prompt for just that item; d stays a one-keypress download to the default. The queue already stores a dir per item, so resume, re-seed and download-again honor the choice with no new plumbing. The prompt reuses FolderPrompt (new title prop), pre-fills with the last D folder this session so batches cost one typed path, and nothing new is persisted. The ? sheet gains d/D entries (d was missing entirely) and the README now mentions both o and D, which it never documented. One behavior fix rides along because D exposed it: queue.add() used to ignore the requested dir when re-adding a failed item, so redirecting a failed download (the disk-full case D exists for) silently retried into the old folder. add() now adopts the requested dir on failed retry, dropping resume progress only when the folder actually changed; covered in queue.add.test.ts with the engine mocked. The f retry key goes through queue.retry() and keeps the item's own folder, unchanged. D on an already-active item says "Already in queue" instead of claiming a folder that wouldn't be used.
This commit is contained in:
@@ -97,6 +97,7 @@ function makeStore(
|
||||
seedFocus: null,
|
||||
setSeedFocus: noop,
|
||||
startDownload: noop,
|
||||
requestDownloadTo: noop,
|
||||
copyMagnet: noop,
|
||||
openDownloadFolder: noop,
|
||||
notice: null,
|
||||
|
||||
Reference in New Issue
Block a user