Downloads in SABnzbd history waiting for import in Sonarr queue incorrectly flagged as unknown client #74
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Downloads that are active/completed but waiting for manual import/interaction in the Sonarr (or Radarr) queue, and have finished downloading in SABnzbd (residing in SABnzbd history), are incorrectly categorized as
"unknown"client /"Orphaned (unconfigured client)"downloads.Technical Analysis & Root Cause
The root cause lies in the title-matching fallback branch of
matchSabHistoryinserver/services/DownloadMatcher.js:matchSabHistoryis called byDownloadBuilder.jsto match SABnzbd history slots against *arr queue and history records.downloadId(matchesSabId) against:sonarrHistoryRecords/radarrHistoryRecordssonarrQueueRecords/radarrQueueRecords(added as a dual-lookup safeguard).titleMatches:sonarrHistoryRecords/radarrHistoryRecords. It completely ignoressonarrQueueRecordsandradarrQueueRecords.DownloadBuilder.js,matchOrphanedArrRecordsdiscovers the unmatched queue record, fails to find a matched download client item, and compiles it as a standalone synthetic card labelled asOrphaned (unconfigured client)/"unknown"client.Impact
Proposed Solution
Update
matchSabHistoryinserver/services/DownloadMatcher.jsto perform the title-matching fallback search against the activeQueueRecordswhenHistoryRecordsyield no matches, mirroring the dual-lookup strategy:And do the same for
radarrMatchandradarrQueueRecords.Evaluation of Issue #74 against the develop branch codebase (as of 2026-05-29)
Issue Summary (confirmed):
The technical analysis is 100% precise and accurate. The root cause is exactly as described.
Codebase Confirmation (develop branch)
1.
matchSabHistory(the function explicitly called out)When the
downloadIdmatch fails (common in the “still in *arr queue” scenario), the title fallback never looks atsonarrQueueRecords/radarrQueueRecords. It only checks history:2. Contrast with
matchSabSlots(active SAB queue)The sibling function
matchSabSlots(for items still downloading in SAB) does it correctly:This asymmetry is the direct cause of the reported symptom.
3. Downstream effect in
DownloadBuilder.jsBecause the SAB history item never matched the still-queued *arr record, the *arr queue item falls through to the orphan path and gets the "unknown client" treatment.
Assessment
matchSabSlotsRecommended Fix
Apply the exact pattern proposed in the issue, but make it symmetric with how
matchSabSlotsalready does the second fallback:This brings
matchSabHistoryinto parity withmatchSabSlots.Additional Observations / Suggestions
matchSabHistoryandmatchSabSlots. Consider a small refactoring helper to keep things unified in the long run.titleMatches(..., { isFallback: true })debug logs will automatically surface these new matches, which is helpful.nzo_iddoes match the *arr queuedownloadId(should already work via dual-lookup).Verdict: This is a legitimate, well-documented bug. The analysis is spot-on, the code confirms it, and the proposed fix is minimal, safe, and correct. Implementing this fix on
developand verifying it via unit/integration tests will resolve this issue.Resolved in commit
87387aaebe.The downloads that are in the SAB history are still shown as "Unknown"
Resolved in commit
b2a837b173.