Skip to content

fix(sabnzbd): keep failed jobs on the first history page - #993

Merged
javi11 merged 3 commits into
kipsilabs:mainfrom
firestaerter3:fix/failed-history-first-page
Oct 14, 2026
Merged

javi11 merged 3 commits into
kipsilabs:mainfrom
firestaerter3:fix/failed-history-first-page

Conversation

@firestaerter3

Copy link
Copy Markdown
Contributor

Fixes #992

Sonarr and Radarr poll the SABnzbd history with start=0 and a fixed limit (DownloadClientHistoryLimit, default 60) and never read a later page. A tracked download that is in neither the queue nor that page is marked untrackable without a downloadFailed event, so the release is never blocklisted and never retried. During a burst of grabs, newer completed rows push failed rows off the page before the arr polls.

On start=0 the history handler now appends every failed row still kept in import_queue (same category and skip_arr_notification filters, capped at 1000) that the page does not already hold. The page itself, noofslots, later pages and the nzo_ids lookup are unchanged.

Tests:

  • TestSABnzbdHistory_FailedRowOnFirstPageDuringBurst: one failed job older than 8 completed jobs, limit=5. Fails on the current code, passes with this change.
  • Guard tests for later pages, no duplicate when the failed row is already on the page, and the nzo_ids lookup.
  • TestSABnzbdFailedHistory_FiltersAndCap for the new repository query.

We have been running this on our instance since 2026-10-09. After deploying, page 0 for one category carried all 46 failed jobs out of 3541 history rows.

firestaerter3 and others added 3 commits October 9, 2026 18:37
Sonarr and Radarr poll SABnzbd history with start=0 and a fixed limit
(DownloadClientHistoryLimit, default 60) and never read a later page. A
tracked download that is in neither the queue nor that page is marked
untrackable without a downloadFailed event, so the release is never
blocklisted and never retried. During a burst of grabs, newer completed
rows pushed failed rows off the page before the *arr polled.

On start=0 the handler now appends every failed row still kept in
import_queue (same category and skip_arr_notification filters, capped at
1000) that the page does not already hold. The page itself, noofslots,
later pages and the nzo_ids lookup are unchanged.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@javi11
javi11 merged commit fdfa7ee into kipsilabs:main Oct 14, 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.

SAB history: failed jobs drop off the first page during a grab burst, so Sonarr/Radarr never mark them failed

2 participants