Skip to content

Conversation

@fallenbagel
Copy link
Collaborator

@fallenbagel fallenbagel commented Jan 18, 2026

Description

When a user has media that was previously available and then deletes the files, Sonarr's "Unmonitor Deleted Episodes" feature automatically unmonitors the individual episodes while leaving the parent season in a monitored state. This creates an edge case where re-requesting the season through Seerr fails to grab any episodes.

The issue occurs because Seerr sets the season's monitored flag to true, but Sonarr only cascades monitoring state changes down to episodes when it detects an actual change. Since the season is already monitored, Sonarr treats this as a no-op and the episodes remain unmonitored. The search command executes but finds nothing to grab because all episodes are unmonitored at the individual level.

This PR adds explicit episode-level monitoring when updating an existing series. After the series update succeeds and before triggering a search, we now fetch all episodes for the requested seasons and re-monitor any that are currently unmonitored. This ensures that re-requests work correctly regardless of whether the season state changed or episodes were previously unmonitored due to file deletion.

How Has This Been Tested?

(I have not tested this. Can be tested via the image :preview-remonitor-sonarr-episodes. Steps to test:)

  1. Add a series with a season in Sonarr, ensure files are available
  2. Enable "Unmonitor Deleted Episodes" in Sonarr's Media Management settings
  3. Delete the season folder from disk
  4. Run a disk scan in Sonarr, confirm episodes become unmonitored while season stays monitored
  5. Run media availability sync in Seerr, confirm status changes to "deleted"
  6. Re-request the season through Seerr
  7. Confirm episodes are now monitored in Sonarr and search is triggered

Screenshots / Logs (if applicable)

Checklist:

  • I have read and followed the contribution guidelines.
  • Disclosed any use of AI (see our policy)
  • I have updated the documentation accordingly.
  • All new and existing tests passed.
  • Successful build pnpm build
  • Translation keys pnpm i18n:extract
  • Database migration (if required)

…ored seasons

When Sonarr's "Unmonitor Deleted Episodes" is enabled, deleted files cause episodes to be
unmonitored while the season stays monitored. Re-requesting sets season.monitored = true, but Sonarr
only cascades to episodes on state change. Since the season is already monitored, episodes stay
unmonitored and searches find nothing. Now explicitly re-monitors episodes for requested seasons
before triggering a search.

fix #2309
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes an edge case in Sonarr integration where re-requesting deleted seasons fails to grab episodes. When Sonarr's "Unmonitor Deleted Episodes" feature unmonitors individual episodes while leaving seasons monitored, Seerr's re-requests would set the season's monitored flag without cascading to episode-level monitoring, causing searches to find nothing.

Changes:

  • Added explicit episode-level monitoring when updating existing series in Sonarr
  • Implemented two new API methods: getEpisodes() to retrieve episodes for a series and monitorEpisodes() to set episode monitoring state
  • Added try-catch logic to re-monitor unmonitored episodes before triggering searches

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@fallenbagel
Copy link
Collaborator Author

Can be tested using :preview-remonitor-sonarr-episodes in about 10 mins from when this comment was posted

@fallenbagel fallenbagel added bug Something isn't working preview PRs deployed for testing with tag `:preview-prxx` labels Jan 18, 2026
@fallenbagel
Copy link
Collaborator Author

Tested by the original reporter and confirmed to work:
https://discord.com/channels/783137440809746482/1437440536523964426/1462555967383142452

@0xSysR3ll 0xSysR3ll merged commit 88b2e78 into develop Jan 20, 2026
21 checks passed
@0xSysR3ll 0xSysR3ll deleted the fallenbagel/fix/sonarr-remonitor-episodes-on-request branch January 20, 2026 17:34
0xSysR3ll pushed a commit to 0xSysR3ll/jellyseerr that referenced this pull request Jan 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working preview PRs deployed for testing with tag `:preview-prxx`

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[bug] Re-requesting deleted seasons fails to re-monitor in Sonarr and refresh episode metadata

4 participants