feat: rank 4K first, fall back to good 1080p
ci / web (push) Successful in 1m3s
e2e / e2e (push) Failing after 1m37s
ci / rust (push) Successful in 2m21s
ci / image (push) Successful in 2m33s

Resolution preference becomes strict tiers (step 10 000) and every
size band gains a ceiling that waives bloated releases, so a 60 GB
remux cannot win the top tier unattended. Movie grab, TV grab, RSS
and the search deck now share one ranking key from arr-core.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Miguel Palhas
2026-11-07 18:02:12 +00:00
co-authored by Claude Opus 5.5
parent abb7e0a489
commit cd9e8a891c
13 changed files with 290 additions and 69 deletions
+33 -14
View File
@@ -290,9 +290,18 @@ in search results means "the name claims DV" and its absence means nothing.
### 5.4 Quality, and why there is no upgrade loop
Default: take 4K if it exists now, otherwise 1080p. Per-title `only_4k`
rejects 1080p outright and keeps searching indefinitely — the escape hatch for
the handful of titles worth waiting on.
Default: take 4K if it exists now, otherwise a good 1080p. The resolution
preference is a list of tiers, not a weighting: any eligible 4K outranks every
1080p, and 1080p is only ever the fallback when no eligible 4K exists. "Good"
means eligible under the same rules as 4K — inside its size band, between the
floor and the ceiling (§5.5), with the right audio and a watchable source. A
1080p that fails that bar is not taken, and the title keeps waiting. Per-title
`only_4k` rejects 1080p outright and keeps searching indefinitely — the escape
hatch for the handful of titles worth waiting on.
A 1080p taken as the fallback is final. The file row shows its resolution, and
the manual search is how it becomes 4K later; nothing re-searches it on its
own (below).
**No grab delay.** Deliberately rejected. Radarr's delay profile exists to stop
first-match-wins from always yielding 1080p; here the `only_4k` flag solves the
@@ -307,11 +316,18 @@ a marker in the UI and a manual "search again" button, not a background job.
Source tier is **not** the dominant term. A remux should win only when nothing
smaller exists.
Per resolution, a floor, a target and a growing penalty above target. For 4K:
floor ~8 GB, target ~22 GB. A 20 GB WEB-DL sits at target and wins; a 60 GB
remux scores badly but stays eligible, so it is picked when it is the only
option. The floor matters — unbounded "smaller is better" selects a 3 GB 4K
encode that looks like mud.
Per resolution, a floor, a target, a growing penalty above target and a
ceiling. For 4K: floor ~8 GB, target ~22 GB, ceiling ~44 GB. A 20 GB WEB-DL
sits at target and wins; a 34 GB BluRay scores worse but stays eligible. The
floor matters — unbounded "smaller is better" selects a 3 GB 4K encode that
looks like mud.
**The ceiling waives, it does not reject.** Strict resolution tiers would
otherwise prefer a 60 GB remux over every good 1080p, which is a bloated
download for something already watchable. Above the ceiling a release is
`waived`: automatic selection never takes it, the manual deck still offers it.
The ceiling is measured exactly as the floor is — per episode, scaled by
runtime — and a band without one has no ceiling.
**A band describes one episode.** For a movie the question never arises — one
release is one film. For TV a release may carry a single episode, several, or a
@@ -372,12 +388,15 @@ entry is worth nothing and every earlier one a step more. A resolution the list
does not carry scores nothing rather than being penalised, the same as an
unclaimed resolution: no ranking is no opinion.
The step is sized against the size term, not chosen in isolation. With the
seeded 4K band — target 22 GB, 60 points per gigabyte over — a step of 300 is
five gigabytes of overshoot: a 4K up to about 27 GB beats an at-target 1080p,
and a bloated 40 GB 4K does not. Below target the same arithmetic asks a 4K to
be within about four gigabytes of its target to win, which is what keeps an 8 GB
4K that looks like mud from beating a good 1080p.
The step is a tier, not a trade-off (§5.4). At 10 000 points it is larger than
everything the size, source and seeder terms can add or take away inside a
band, so the step decides between resolutions and the other terms only order
releases of the same one. The band's floor and ceiling are what keep a mud
encode or a bloated remux out of the top tier, not the step.
Every selection — targeted movie search, TV search, RSS and the manual deck —
orders candidates through one key in `arr-core`: score, then indexer id, then
guid. The deck's top eligible row is the release an automatic grab would take.
Exact numbers are policy rows, tuned by hand. The model is the decision.