[PR #12737] [CLOSED] Never set RemoveOldMetadata when replacing all metadata. #13343

Closed
opened 2026-02-07 07:11:19 +03:00 by OVERLORD · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/jellyfin/jellyfin/pull/12737
Author: @nielsvanvelzen
Created: 9/28/2024
Status: Closed

Base: masterHead: fix-season-unknown-for-real


📝 Commits (1)

  • 5d0b5b6 Never set RemoveOldMetadata when replacing all metadata.

📊 Changes

1 file changed (+1 additions, -2 deletions)

View changed files

📝 Jellyfin.Api/Controllers/ItemRefreshController.cs (+1 -2)

📄 Description

When RemoveOldMetadata is set it will clear all existing metadata from items before applying the new information. This breaks virtual seasons as episodes will never have a ParentIndexNumber set unless the season is part of the episode file name (which in a lot of cases, it is not). The fallback to "season 1" is only available in EpisodeResolver which is not called during metadata refresh. When the ParentIndexId is reset to null the RemoveObsoleteSeasons method in SeriesMetadataService will remove the virtual season(s) as it thinks there are no episodes in them.

This change only affects the behavior when using a full metadata refresh, other cases of the season unknown issue have been fixed in my previous fixes (#12240 and #12356) in 10.9.z releases.

Changes

  • Never set RemoveOldMetadata when replacing all metadata.

Issues


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/jellyfin/jellyfin/pull/12737 **Author:** [@nielsvanvelzen](https://github.com/nielsvanvelzen) **Created:** 9/28/2024 **Status:** ❌ Closed **Base:** `master` ← **Head:** `fix-season-unknown-for-real` --- ### 📝 Commits (1) - [`5d0b5b6`](https://github.com/jellyfin/jellyfin/commit/5d0b5b6f53503d6721036327287aa05de27e7604) Never set RemoveOldMetadata when replacing all metadata. ### 📊 Changes **1 file changed** (+1 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `Jellyfin.Api/Controllers/ItemRefreshController.cs` (+1 -2) </details> ### 📄 Description When RemoveOldMetadata is set it will clear all existing metadata from items before applying the new information. This breaks virtual seasons as episodes will never have a ParentIndexNumber set unless the season is part of the episode file name (which in a lot of cases, it is not). The fallback to "season 1" is only available in EpisodeResolver which is not called during metadata refresh. When the ParentIndexId is reset to null the RemoveObsoleteSeasons method in SeriesMetadataService will remove the virtual season(s) as it thinks there are no episodes in them. This change only affects the behavior when using a full metadata refresh, other cases of the season unknown issue have been fixed in my previous fixes (#12240 and #12356) in 10.9.z releases. **Changes** - Never set RemoveOldMetadata when replacing all metadata. <!-- Describe your changes here in 1-5 sentences. --> **Issues** <!-- Tag any issues that this PR solves here. ex. Fixes # --> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
OVERLORD added the pull-request label 2026-02-07 07:11:19 +03:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/jellyfin#13343