fix(jellyfin-scanner): include unmatched seasons in processable seasons#2538
Conversation
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.
|
No actionable comments were generated in the recent review. 🎉 📝 WalkthroughWalkthroughThe change adds an else branch to handle seasons without matching Jellyfin seasons in the Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Poem
🚥 Pre-merge checks | ✅ 2✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Comment |
There was a problem hiding this comment.
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
processableSeasonswith 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.
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,processShowwould 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
processShowin 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:
pnpm buildpnpm i18n:extractSummary by CodeRabbit