Fix Sonarr episode handling when media indexes are missing#2492
Closed
enoch85 wants to merge 3 commits into
Closed
Fix Sonarr episode handling when media indexes are missing#2492enoch85 wants to merge 3 commits into
enoch85 wants to merge 3 commits into
Conversation
Fall back to episode air dates when Sonarr episode actions cannot use an episode index, so daily episodes can still be matched and handled. Propagate explicit success and failure from Sonarr and Radarr actions through the collection handler, and only remove media from Maintainerr collections after the external action and optional Seerr cleanup succeed. Stop the collection worker from reporting failed media as handled, emit collection failure state when media handling fails, and add regression coverage for the Sonarr fallback and worker accounting. Fixes #2491
enoch85
added a commit
that referenced
this pull request
Mar 15, 2026
PR #2492 - Fix Sonarr episode handling when media indexes are missing - Safely identify episodes via getEpisodeLookup (index or air date fallback) - Return boolean from action handlers to detect servarr update failures - Add airDate-based episode matching in Sonarr helper
Collaborator
Author
Collaborator
Author
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.
Fix #2491
Summary
This issue started as a Sonarr episode identification bug, but review of the full handling flow uncovered a second correctness problem in the same path: Maintainerr could mark media as handled and remove it from the collection before external actions had actually succeeded.
Fixing the issue safely required correcting both:
That is why the PR touches more than the original Sonarr lookup point.
Testing