Search API with classified releases #65
Reference in New Issue
Block a user
Delete Branch "issue/17-search-api"
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
Issue
Closes #17
Test plan
just ciReviewed
cab0d33.@@ -0,0 +165,4 @@let movie = tmdb.movie(id).await.map_err(|error| upstream_error(&error))?;In the
TmdbId/ImdbIdflow a TMDB 404 fails the whole request, even when the library query matched. Unified search (§9.2) should still return the library group with an emptytmdblist instead of erroring.@@ -0,0 +294,4 @@SearchRequest::Text { .. } if indexer.capabilities.search.available => request.clone(),_ => continue,};if let Ok(releases) = prowlarr.search_indexer(indexer.id, &indexer_request).await {if let Okswallows indexer search failures — a dead tracker is indistinguishable from zero releases, which matters in a manual-search view. At minimum log; better, surface per-indexer errors in the response.@@ -0,0 +332,4 @@} else if lower.strip_prefix("tmdb:").is_some_and(|id| id.trim().chars().all(|c| c.is_ascii_digit()))|| lower.chars().all(|c| c.is_ascii_digit())Bare all-digit input classifies as
TmdbId, so titles like "1917" or "2012" can never be text-searched. Thetmdb:prefix already covers unambiguous TMDB ids; treat bare digits as text (or run both lookups).@@ -0,0 +457,4 @@})}fn score(score()re-implements scoring in arr-api with hard-coded weights (10_000/5_000 resolution steps, ×5 source, ×2 seeders, 100 MB penalty unit). Scoring belongs to arr-core and has its own open issue #13, which says the numbers live in policy rows, not code — and #64 already tracks a row↔Policyscoring-unit mismatch this adds another variant of. It also treats below-floor size as a penalty, where #13 / DESIGN §5.5 make it a hard filter. Either call the #13 implementation from arr-core when it lands, or note on #13/#64 that this is a placeholder to be replaced.Addressed in
f78735b: numeric input now runs ID and title lookup, missing TMDB IDs preserve library results, and indexer failures are logged. The temporary scoring bridge is now recorded on #13 and #64 for replacement by the core scorer.Reviewed
f78735b. The bare-digit, indexer-error and TMDB-404 findings are addressed. The scoring finding stands:score()is unchanged — hard-coded weights in arr-api, overlapping open issues #13/#64. Fine to land as a placeholder if that is the intent, but say so on #13/#64 so the arr-core implementation replaces this rather than coexisting with it.