Skip to content

Re-find expired Prowlarr releases like the book search does; simpler Queued and Wanted tables - #58

Merged
mikaeltarquin merged 3 commits into
mainfrom
claude/download-failed-oserror-oprsq0
Oct 4, 2026
Merged

mikaeltarquin merged 3 commits into
mainfrom
claude/download-failed-oserror-oprsq0

Conversation

@mikaeltarquin

Copy link
Copy Markdown
Owner

Summary

Expired indexer links ("the release could not be refreshed")

  • When a queued release's link has expired, the handler re-searches Prowlarr for the same release. That search was built only from the download's title, so it could miss a release that was still there:
    • A long title with its subtitle ("Good Omens: The Nice and Accurate Prophecies of Agnes Nutter, Witch") finds nothing on an indexer that ANDs its terms.
    • A short, common title ("Eric") returns so many other books ("Eric Brown - Helix") that the release isn't among the results.
  • The refresh now tries, in order, stopping at the first exact match:
    1. The book's own release search, using the metadata provider's record from the download's book_key.
    2. Title + first author as one query ("Eric Terry Pratchett").
    3. The provider search again without content-type categories.
    4. Without a provider record: the title without its subtitle, then title + author.
  • It still never substitutes a different release.

Queued → Waiting for room

  • No "Queue for download" checkbox. Remove already takes an item out.
  • New columns:
    • Waiting for: the reason from the last automatic check.
    • Last checked: when that check last looked at the item.
    • Next check: a live countdown. GET /api/saved now returns next_check_at, and the page re-reads the list just after each check.
  • Releases are listed one per line ("Ebook, EPUB", "Audiobook, Tony Robinson").

Wanted

  • One Releases column with Choose releases, which opens the release picker. Picks saved there put the book in the queue. No Automatic download column.
  • Wanted items that already have releases picked move into the queue themselves. One whose last automatic download partly failed stays, with its error, "Choose again" and "+ Get".

Testing

  • Python: new tests for the refresh search order (provider book first, title + author for "Eric", fallback when the provider fails), next_check_at (scheduled vs. quick check), and the list route. With -m "not integration and not e2e", the only local failures are the same 5 environment ones as before.
  • Frontend: typecheck, oxlint, oxfmt, vitest (348 tests). New tests for per-line releases and "Waiting for".
  • Ran the app locally with test data:
    • Queued and Wanted render as described.
    • A picked Wanted item moved itself to the queue; the one with an error stayed.
    • The Next check countdown ticks and updates after a check.

🤖 Generated with Claude Code

https://claude.ai/code/session_01V88DbAixT45r3AJsyFJchY


Generated by Claude Code

claude added 3 commits October 4, 2026 06:59
…rch does

When a queued release's indexer link has expired, the handler re-searches
Prowlarr for the same release. That search was built only from the
download's title, so a book with a subtitle ("Good Omens: The Nice and
Accurate Prophecies of Agnes Nutter, Witch") searched an indexer that ANDs
its terms with the whole thing and found nothing. The download then failed
with "the release could not be refreshed", although a search from the
book's page found the same release straight away.

The refresh now searches like the book's own release search:
- First with the metadata provider's record of the book (from the
  download's book_key), with its looser search title and its ISBNs.
- Then the same, widened.
- Last, a book built from the download, searched by its title without the
  subtitle and its first author.
It stops at the first search that finds the exact same release, and still
never substitutes a different one.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01V88DbAixT45r3AJsyFJchY
A short, common title ("Eric", by Terry Pratchett) searched alone brings
back so many other books ("Eric Brown - Helix") that the release being
refreshed isn't among the results. Searching by hand for "Eric Terry
Pratchett" found it at once.

The refresh now adds that search: the search title and first author as one
query. It runs after the book's own release search and before the search
without content-type categories, which only widens the categories and
doesn't help here. Without a provider book: the download's title without
its subtitle, then title and author.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01V88DbAixT45r3AJsyFJchY
Queued (waiting for room)
- No "Queue for download" checkbox: Remove already takes an item out, and an
  unticked box quietly stopped it downloading.
- "Waiting for" shows what the automatic check found ("2 unsatisfied slots",
  "Freeleech or ratio 2.00: …"), "Last checked" when it last looked, and
  "Next check" counts down to the next run. GET /api/saved now says when the
  next check is due (next_check_at); the page reads the list again just
  after it, so the countdown moves on to the following one.
- Releases are listed one per line: "Ebook, EPUB", "Audiobook, Tony
  Robinson".

Wanted
- One Releases column with "Choose releases", which opens the release
  picker. Picks saved there put the book in the queue. No Automatic download
  column.
- Wanted items that already have releases picked move into the queue
  themselves. One whose last automatic download partly failed stays, with
  its error, "Choose again" and "+ Get", so it isn't retried blind.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01V88DbAixT45r3AJsyFJchY
@mikaeltarquin
mikaeltarquin merged commit 2711cda into main Oct 4, 2026
7 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