Skip to content

Comments

fix(jellyfin-scanner): include unmatched seasons in processable seasons#2538

Merged
fallenbagel merged 1 commit intodevelopfrom
fallenbagel/fix/jellyfin-scanner-missing-seasons
Feb 21, 2026
Merged

fix(jellyfin-scanner): include unmatched seasons in processable seasons#2538
fallenbagel merged 1 commit intodevelopfrom
fallenbagel/fix/jellyfin-scanner-missing-seasons

Conversation

@fallenbagel
Copy link
Collaborator

@fallenbagel fallenbagel commented Feb 20, 2026

Description

The Jellyfin scanner was only passing seasons it found in the Jellyfin library to processShow, omitting any seasons that weren't present in the metadata provider. This meant that if a user requested a single season of a multi-season show and that season was downloaded, processShow would only have Season entities for that one season and since all known seasons were available, the show was incorrectly marked as fully available. A subsequent Sonarr scan would then correct it to partially available, but the initial status was wrong and could trigger incorrect notifications.

PR #2412 addressed a related issue by changing the availability calculation to check actual Season entities rather than scanner input, but it couldn't account for seasons that were never passed to processShow in the first place. The Plex scanner already handles this correctly by including unmatched seasons with zero episodes. This change applies the same pattern to the Jellyfin scanner.

How Has This Been Tested?

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)

Summary by CodeRabbit

  • Bug Fixes
    • Improved processing of seasons that lack matching Jellyfin entries, ensuring they're properly tracked and represented in the system.

The Jellyfin scanner only passed seasons found in the library to processShow, so a show with only
one season downloaded would have all its Season entities marked available, causing the overall show
status to be AVAILABLE. Despite PR #2412 fixing the availability check to use actual Season entities
instead of scanner input, the underlying issue remained because Season entities were never created
for seasons missing from Jellyfin. This aligns the Jellyfin scanner with how the Plex scanner
already handles unmatched seasons.
@fallenbagel fallenbagel requested a review from a team as a code owner February 20, 2026 20:04
@fallenbagel fallenbagel added bug Something isn't working severity: critical labels Feb 20, 2026
@coderabbitai
Copy link

coderabbitai bot commented Feb 20, 2026

No actionable comments were generated in the recent review. 🎉


📝 Walkthrough

Walkthrough

The change adds an else branch to handle seasons without matching Jellyfin seasons in the processJellyfinShow function. When no Jellyfin season is found, a processable season entry is now created with zero episodes and episodes4k, while preserving totalEpisodes for downstream processing.

Changes

Cohort / File(s) Summary
Jellyfin Season Processing
server/lib/scanners/jellyfin/index.ts
Added else branch in processJellyfinShow to create processable season entries for seasons without matching Jellyfin seasons, preserving totalEpisodes while setting episodes and episodes4k to 0.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Poem

🐰 A season lost in Jellyfin's haze,
Now recorded through the rabbit's gaze!
With zero episodes, yet total held dear,
Each orphaned season appears crystal clear! ✨

🚥 Pre-merge checks | ✅ 2
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely summarizes the main change: adding unmatched seasons to processable seasons in the Jellyfin scanner, which is the primary objective of the PR.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Comment @coderabbitai help to get the list of available commands and usage tips.

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

Updates the Jellyfin scanner to ensure processShow receives season entries for all TMDB-known seasons (not just those present in Jellyfin), preventing incorrect “fully available” show status when only a subset of seasons exists in the library.

Changes:

  • Populate processableSeasons with zero-episode entries for TMDB seasons that have no matching Jellyfin season.
  • Align Jellyfin scanner season handling with the existing Plex scanner behavior for unmatched seasons.

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

@fallenbagel fallenbagel merged commit 68f56d2 into develop Feb 21, 2026
25 checks passed
@fallenbagel fallenbagel deleted the fallenbagel/fix/jellyfin-scanner-missing-seasons branch February 21, 2026 01:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working severity: medium

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants