Skip to content

Fix duplicate grabs, request tracking, and Prowlarr magnets - #106

Merged
BlizzHacker merged 2 commits into
mainfrom
codex/issues-101-105
Oct 31, 2026
Merged

BlizzHacker merged 2 commits into
mainfrom
codex/issues-101-105

Conversation

@BlizzHacker

@BlizzHacker BlizzHacker commented Oct 31, 2026 •

Copy link
Copy Markdown
Owner

Changes

  • Prevent Missing Search, RSS, and dead-download replacement sweeps from starting a duplicate download for a game and platform that already have one in flight. A short reservation also covers overlapping sweeps while indexers and clients respond.
  • Preserve the external request ID when replacing a failed download so the integration can receive its final status and imported assets.
  • Accept Prowlarr redirects that end in a valid magnet URI for qBittorrent. The redirect response is closed, apikey is removed, and the existing same-origin restriction remains in place for HTTP redirects.
  • Page SABnzbd failed history so failures beyond its first 100 entries are found.

Closes #103, #104, and #105. The SABnzbd history paging also addresses a follow-up review note on the merged #101 fix.

Verification

  • Focused regressions: 94 passed.
  • Full non-slow suite on this branch: 2,692 passed, 5 skipped in 260.88s.

Summary by CodeRabbit

  • Bug Fixes
    • Automatic missing-game searches and RSS sync now skip games that are already queued or being downloaded, reducing duplicate requests and reporting skipped items.
    • Failed-download replacements preserve the existing external request.
    • Prowlarr magnet links can be sent directly to qBittorrent; torrent-file downloads continue to work.
    • SABnzbd failed-download history now includes results beyond the latest 100 entries.

@coderabbitai

coderabbitai Bot commented Oct 31, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Findings

Actionable comments posted: 2

Caution

Review failed

The pull request is closed.

Recent review info
Run configuration
Commits

Reviewing files that changed from the base of the PR and between 50e26cf and 59880a2.

Files selected for processing: 7
  • romarr/app.py
  • romarr/downloaders.py
  • romarr/indexers.py
  • tests/test_failed_download_handling.py
  • tests/test_qbittorrent_prowlarr_upload.py
  • tests/test_sabnzbd_failed_jobs.py
  • tests/test_scheduling_integration.py

Included review availability: This review used your included allowance. Your plan provides up to 2 included reviews per hour; 1 remain after this review.

Walkthrough

Automatic sweeps now avoid duplicate in-flight requests, and failed-download replacements retain external request IDs. Prowlarr magnet redirects can reach qBittorrent after API-key removal. SABnzbd failed-history retrieval now paginates beyond the first 100 entries.

Changes: Automatic grab safeguards

Layer / File(s) Summary
Guard automatic requests and grabs
romarr/app.py, tests/test_scheduling_integration.py
Automatic missing searches and RSS sync skip game/platform pairs that are queued, grabbed, or reserved. Their results report in-flight skips.
Preserve request identity on replacement
romarr/app.py, tests/test_failed_download_handling.py
Failed-download replacement requests use the guarded path and retain the external request ID. The regression test checks the replacement and Seerr request status.

Prowlarr magnet handling

Layer / File(s) Summary
Validate and submit magnet redirects
romarr/indexers.py, romarr/app.py, tests/test_qbittorrent_prowlarr_upload.py
Prowlarr validates magnet redirects and removes API-key query fields. ROMarr submits valid magnets to qBittorrent; tests cover redirect handling and the grab result.

SABnzbd failed-history pagination

Layer / File(s) Summary
Page through failed history
romarr/downloaders.py, tests/test_sabnzbd_failed_jobs.py
Failed-job lookup pages through history in batches of 100 and filters duplicate IDs and non-failed rows. Tests cover pagination across 101 results.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Change: Bug fix · Severity of issue fixed: Medium

Possibly related issues

  • #101 — The change pages through SABnzbd failed history beyond the first 100 entries, addressing the reported history lookup limitation.
  • #105 — The change accepts valid Prowlarr magnet redirects and removes apikey while retaining same-origin checks for HTTP redirects.
  • #104 — The change passes the external request ID to failed-download replacement requests.

Possibly related PRs

  • BlizzHacker/romarr#102: This PR extends the SABnzbd failed-history path and replacement-grab handling introduced there.
  • BlizzHacker/romarr#76: This PR sends Prowlarr magnet URIs to qBittorrent and records the tag-based download ID used for URL grabs.
  • BlizzHacker/romarr#82: This PR uses qBittorrent tag-based download IDs when submitting Prowlarr magnet URIs.
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

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.

Automatic grabs start a second download while the game already has one in flight

1 participant