Skip to content

make a failed import recoverable - #31

Merged
JeremiahM37 merged 3 commits into
JeremiahM37:mainfrom
vedhavyas:upstream/import-retry
Aug 23, 2026
Merged

make a failed import recoverable#31
JeremiahM37 merged 3 commits into
JeremiahM37:mainfrom
vedhavyas:upstream/import-retry

Conversation

@vedhavyas

@vedhavyas vedhavyas commented Aug 23, 2026

Copy link
Copy Markdown
Contributor

qBittorrent does not always have the finished files at the path it reports by the time the watcher fires, so an import can fail on a path that appears a moment later and the job then sits at error with nothing retrying it. This retries on a bounded schedule, and once the budget is spent it leaves a row saying the download is still in the client so it can be organized by hand.

The Retry button now re-runs that import. It previously wrote a queued status nothing consumes, so the job read as permanently active and the click did nothing.

The scan-and-organize step is now in one place rather than duplicated across callers.

@vedhavyas
vedhavyas force-pushed the upstream/import-retry branch from 3d17902 to f2312e9 Compare August 23, 2026 03:57
Retry wrote a queued status the UI has no button for, so the job parked
where nothing picked it up. It now resolves the torrent from the hash the
job recorded and re-runs the import on the same row, and the button is
hidden on a job with no torrent behind it.

An import claims its download by hash for the duration, so a retry cannot
race the watcher or a manual organize over the same files. The monitor's
retry_job action moves to approval, since an import moves files into the
vault.
@vedhavyas vedhavyas changed the title retry an import whose files are not in place yet make a failed import recoverable Aug 23, 2026
Picks up the manager_test fix from JeremiahM37#30: the import writes the completed
status before it tracks the library item, so waiting on that status and
asserting the library row in the same breath races. It is what made the
test job red here on a slow runner.
@JeremiahM37
JeremiahM37 merged commit f655f9f into JeremiahM37:main Aug 23, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants