Skip to content

Seasons stay PROCESSING after a request is deleted, permanently blocking re-requests ("No seasons available to request") #3276

Description

@Knat-Dev

Description

When a TV request is deleted, the related Season rows keep their previous status (PROCESSING/PENDING) forever. If the series was also removed from Sonarr, the media row itself is correctly reset (thanks to #3064), but the stale season statuses make any later request for the same seasons fail with "No seasons available to request" — in the UI the affected seasons show as "Requested" with their toggles locked in the Request modal, so the title just looks permanently requested. The only workaround is Clear Data on the media.

I hit this organically first: a show requested in the evening and deleted about 12 hours later — long past the scheduled scans, so the season rows were already in place — was then impossible to re-request. I subsequently reproduced it deterministically with an unrelated show — steps below.

Root cause (traced on current develop):

  • The Season entities are created by the scan jobs (baseScanner), not at request time — e.g. the Sonarr Scan sets the requested seasons to PROCESSING once it sees the series in Sonarr.
  • handleRemoveParentUpdate in server/subscriber/MediaRequestSubscriber.ts (runs on request removal via afterRemove) resets media.status / media.status4k, but never touches the Season entities the deleted request covered.
  • The request validator in server/entity/MediaRequest.ts treats every season whose status is not UNKNOWN/DELETED as already existing, so finalSeasons ends up empty → NoSeasonsAvailableError.
  • Notably, the decline path in updateParentStatus already resets season statuses back to UNKNOWN when no other active request covers them — the delete path is just missing the equivalent logic, and fix(request): restore media status correctly when deleting requests #3064 fixed the media-level half of this without the season-level half.

Version

3.3.0 (commit 703faf9), Docker (ghcr.io/seerr-team/seerr:latest), Sonarr v4, Plex

Steps to Reproduce

Reproduced deterministically with Checkout (TMDB 97177), season 1:

  1. Request season 1 of a TV show → auto-approved and sent to Sonarr.
  2. Run the Sonarr Scan job (Settings → Jobs & Cache → Run Now) and let it finish. This is what creates the Season rows: GET /api/v1/media now shows seasons = [(1, PROCESSING), (2–5, UNKNOWN)]. (On a live instance this step happens by itself within one scan interval, so any request older than ~30 minutes is affected.)
  3. Delete the request in Seerr, and delete the series in Sonarr.
  4. Observe: media.status resets to 1 (UNKNOWN, the fix(request): restore media status correctly when deleting requests #3064 behavior working), there are zero remaining requests for the media — but season 1 is still PROCESSING.
  5. Try to request season 1 again → in the Request modal the season shows "Requested" with the toggle locked; via API, POST /api/v1/request {"mediaType":"tv","mediaId":97177,"seasons":[1]} returns {"message":"No seasons available to request"}.

Timing note: if step 2 is skipped (request deleted within a couple of minutes, before any scan runs), the bug does not manifest, because no Season rows exist yet. This timing dependence makes quick tests pass while real-world usage — where requests live for hours or days before deletion — reliably hits it.

Screenshots

No response

Logs

N/A — no errors are logged; this is silent state inconsistency (evidence is in the API responses above).

Platform

desktop

Database

SQLite (default)

Device

Desktop PC (server: Docker on an Ubuntu 24.04 VM)

Operating System

Arch Linux (client) / Ubuntu 24.04 (server)

Browser

Chrome

Additional Context

I'd be happy to submit a PR for this. The fix I have in mind mirrors the existing decline-path pattern inside handleRemoveParentUpdate: after the media-level status handling, for each of the media's seasons (matching the removed request's is4k variant) whose status is PENDING or PROCESSING and which is not covered by any remaining active (non-declined/non-completed) request, reset the status to UNKNOWN. Available/partially-available seasons stay untouched since they reflect real library availability. Would that approach be acceptable?

(Apologies for the initial submission missing the form fields — it was filed via the GitHub CLI; since edited to match the template.)

Search Existing Issues

  • Yes, I have searched existing issues.

Code of Conduct

  • I agree to follow Seerr's Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions