Skip to content

Let a queued book's cheap picks download without the rest - #59

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

mikaeltarquin merged 1 commit into
mainfrom
claude/download-failed-oserror-oprsq0

Conversation

@mikaeltarquin

Copy link
Copy Markdown
Owner

Summary

The automatic check weighed all of a saved item's picks together. A freeleech audiobook and a small ebook waited as long as a large non-freeleech audiobook picked with them couldn't go, which wasted free unsatisfied slots that would have been building ratio.

  • Each pick is now weighed on its own, cheapest first: nothing on MAM, then freeleech (still checked live), then by size. Each one goes if it fits (unsatisfied slots, buffer, target ratio) alongside the picks already going.
  • Picks that don't fit stay on the item in the queue with "Waiting for" saying why. They stay queued, unlike a pick that failed to queue, which still turns the item off with last_error.
  • SavedItemsService.keep_picks gains a "still waiting" mode for this: keeps auto_get, sets auto_status, no error.
  • The Queued page's description now says each release is decided on its own.

Testing

  • New tests:
    • Freeleech audiobook and small ebook go while a 40 GB non-freeleech audiobook waits for the ratio.
    • With one free slot, the freeleech pick gets it ahead of a paid pick listed first.
    • A partly downloaded item stays queued with its remaining picks.
  • The new and updated tests fail on the old code.
  • Python (-m "not integration and not e2e"): only the same 5 environment failures as before.
  • Frontend: typecheck, oxlint, oxfmt, vitest (348).

🤖 Generated with Claude Code

https://claude.ai/code/session_01V88DbAixT45r3AJsyFJchY


Generated by Claude Code

The automatic check weighed all of a saved item's picks together: a
freeleech audiobook and a small ebook waited as long as a large
non-freeleech audiobook picked with them couldn't go, which wasted free
unsatisfied slots that would have been building ratio.

Each pick is now weighed on its own, cheapest first: nothing on MAM, then
freeleech, then by size. Each one goes if it fits (unsatisfied slots,
buffer, target ratio) alongside the ones already going. Picks that don't
fit stay in the queue as the item's remaining releases, with "Waiting for"
saying why. They stay queued, not turned off as a failed pick is.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01V88DbAixT45r3AJsyFJchY
@mikaeltarquin
mikaeltarquin merged commit 8e5f380 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