Skip to content

refactor(queue): name retry_download's hold read-back, and document the shared history read for two more tools - #702

Merged
bardesss merged 1 commit into
bardesss:mainfrom
ghostintherack:fix/700-followups
Nov 17, 2026
Merged

bardesss merged 1 commit into
bardesss:mainfrom
ghostintherack:fix/700-followups

Conversation

@ghostintherack

Copy link
Copy Markdown
Contributor

Your three optional notes on #700.

  • A named helper for the read-back. The find(hold => HOLD_FLAGS.every(...)) in retry_download's applied is now holdOf(r), next to HOLD_FIELDS, exported and tested on its own: one case per hold, no flags, and two flags no hold has together.
  • The ten-second window in more docs. The diagnose_media and retry_download sections of docs/tools.md now say that for up to ten seconds after the wait ends, a queue paused by hand can still read as the wait, as the pause_downloads section already did; each paragraph is re-wrapped from the changed line on. get_queue makes the same history read but reports no hold (project in src/tools/getQueue.ts leaves heldBy out of its rows), so its section needs nothing.
  • The resume preview in that window is left as it is. After "Restarts the SABnzbd queue on sabnzbd if it is paused by hand.", its wait sentence is conditional: "If sabnzbd is waiting on post-processing ("Pause Downloading During Post-Processing"), this does not end that, and downloading starts once it ends." (resumeLine and WAIT_TEXT.resume in src/tools/pauseDownloads.ts). The resume is sent either way, so the preview holds when the wait has just ended too. The pause_downloads section of docs/tools.md described it without that condition ("its preview says that downloading starts once the wait ends"), and now adds "if SABnzbd is waiting". I can reword the preview itself if you would rather.

No tool description, preview or other client text changes.

Verified

The holdOf cases fail with a read-back that takes a hold whose fields are only some of those set, and with one that takes a hold whose fields include all those set. The retry_download tests that read each hold back pass unchanged.

Gates on Node 24.22.2: lint, typecheck, build and codegen exit 0 with no generated diff, and 207 test files / 7,188 tests pass (main: 7,182).

…he shared history read for two more tools

retry_download's `applied` read its hold back with a `find()` inside
the object spread of its outcome. That expression is now `holdOf`,
next to `HOLD_FIELDS`, exported and tested on its own: the hold whose
fields are exactly the flags set, whatever their order.

SABnzbd's history read is shared for ten seconds while it shows a
download in post-processing (bardesss#700), so for up to ten seconds after the
wait ends a queue paused by hand can still read as the wait. The
pause_downloads section of docs/tools.md said so; the diagnose_media
and retry_download sections now say it too, and the pause_downloads
section words the resume preview's wait sentence as the condition it
is. Each paragraph is re-wrapped from the changed line on. get_queue
makes the same read but reports no hold (its rows leave `heldBy` out),
so its section needs nothing.
@bardesss
bardesss merged commit 354a68f into bardesss:main Nov 17, 2026
2 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