feat: report the current status of an already-requested movie - #22
Open
matiasba wants to merge 1 commit into
Open
feat: report the current status of an already-requested movie#22matiasba wants to merge 1 commit into
matiasba wants to merge 1 commit into
Conversation
Selecting a movie Radarr already has ended the flow with a flat "Already requested - nothing more to add", which says nothing about whether the movie is on disk, downloading, stuck or still waiting for a release. Add `MediaBackend::early_stop_message`, which runs after `early_stop` has already decided to end the flow, so a backend is free to query for status there without breaking the "no backend request" contract `early_stop` itself carries. Backends that have nothing to add inherit a default that returns the previous message, so Sonarr and Seerr are unaffected. Radarr implements it by reading the library record and the queue in parallel, and reports what it finds: the quality on disk, download progress, a stalled or blocked download along with Radarr's own explanation, or why nothing is happening yet. Either request failing falls back to the generic message rather than reporting a wrong state. The early-stop path also now acknowledges the dropdown interaction before that lookup - Discord marks a component interaction left unanswered for three seconds as failed. Refs activexray#16 Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #16
Selecting a movie Radarr already has ended the flow with a flat "Already
requested - nothing more to add". This replaces it with what Radarr is
actually doing:
Already available (Bluray-1080p)Downloading - 47%, 00:12:34 remainingDownload stalled at 47% - The download is stalled with no connectionsDownloaded, but the import is blockedQueued for download/Download paused at 12%/Waiting on an indexer delayWaiting to be available - Radarr is searching for a releaseWaiting to be available - not released yet (expected 2026-09-01)Already in Radarr, but not monitored - nothing will be downloadedHow
New trait method
MediaBackend::early_stop_message, called only onceearly_stophas decided to end the flow — so it can query the backend withoutbreaking the "no backend request" contract
early_stopitself carries. It has adefault returning the previous message, so Sonarr and Seerr are unaffected.
Radarr implements it by reading
GET /movie/{id}andGET /queue/detailsinparallel. If either request fails it falls back to the generic message rather
than reporting a wrong state.
It also acknowledges the dropdown interaction before that lookup — Discord marks
a component interaction left unanswered for three seconds as failed. Happy to
split that out if you'd prefer it separate.
Testing
12 unit tests covering the status formatting, which is a pure function over the
Radarr payloads.
cargo test,cargo clippy --all-targetsandcargo fmt --checkare clean. Also verified running against a live Radarrinstance.