Repository navigation
Show when a release was grabbed or failed in Sonarr v5 interactive search - #852
Merged
Merged
Conversation
…arch Sonarr v5 adds history dates to GET /api/v5/release (Sonarr/Sonarr@4c556eac), but not to /api/v3/release. Sonarr instances reporting version 5 or later now search and grab through /api/v5/release, falling back to v3 on an empty 404. Grabs must use v5 too, because Sonarr caches releases separately for each API version. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
SeriesRelease now decodes both the flat v3 shape and the nested v5 shape, replacing SeriesReleaseV5. DownloadReleaseCommand also sends searchInfo, which v5 reads and v3 ignores, so search and grab differ only by path through Instance.preferringSonarrV5. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MYjz4ojbQ3WH6ZsETB2Pzg
SonarrV5ReleaseDecoder reshapes the nested v5 JSON into the v3 shape, so SeriesRelease keeps its synthesized Decodable. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MYjz4ojbQ3WH6ZsETB2Pzg
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.
Sibling of #839 for Sonarr. Sonarr v5 adds
history: { grabbed, failed }to releases (Sonarr/Sonarr@4c556eac), but only in/api/v5/release. The v3 resource doesn't have it, even on v5 builds.Instance.withAPIVersion(private, inAPI+Live.swift) sends a request to/api/v5when the instance is Sonarr with a storedversionof 5 or later, otherwise to/api/v3. It falls back to v3 on an empty-body 404, which is what Sonarr v4 returns for an unknown/apiroute. v5's own "release not in cache" 404 has a JSON message, so it isn't swallowed. ThereleasesanddownloadReleaseclosures only change their path.SonarrV5ReleaseDecoder, aJSONDecodersubclass passed only for the v5 search, flattensrelease,parsedInfoanddecisioninto the top level, takes the first ofseasonNumbersasseasonNumber, and turns rejection objects into their messages.SeriesReleasekeeps its synthesizedDecodable.DownloadReleaseCommandalso sendssearchInfo, which v5 reads and v3 ignores (Sonarr's System.Text.Json settings don't reject unknown members). Grabs must go through v5 when the search did, because Sonarr keys its release cache by controller type.Verified:
xcodebuild testpasses (240 tests) and the iOS simulator build succeeds.series-releases.jsonfixtures converted into the v5 shape, with nulls omitted as Sonarr does, decode throughSonarrV5ReleaseDecoderto output identical (SHA-256) to the v3 originals. The history dates decode, including 7-digit fractional seconds.searchInfo. Radarr and plain grabs are unchanged.Not verified against a live Sonarr v5 instance, or that v4 really returns an empty 404 for
/api/v5/release(inferred from Sonarr'sStartup.csandStaticResourceController).Caveats:
instance.versiononly refreshes when Settings checks the instance or it's edited, so the v5 path starts after an upgrade once Settings has been opened.🤖 Generated with Claude Code