Do not apply search results on seasons #5384
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This one has already caused several issues with season metadata providers over last few years (!). TLDR: When using "Identify" Jellyfin would set series name and providers into
SeasonInfo
when calling GetMetadata on it.Changes
refreshOptions.SearchResult
contains series info even when refreshing metadata for seasons. I've just added season type check since I did not have any better ideas and we can't use "Identify" for seasons anyways.Issues
#4948
#4134
#1843
P.S. I hate myself for spending so much time debugging this.
EDIT: I've noticed that when reidentifying a series, season and episode metadata is not reset. Shouldn't we do it? I mean if a series was identified wrong then all seasons and episodes will have wrong provider IDs. When refreshing metadata for season/episode after "Identify" metadata providers will not care that series ID has changed because episode/season ID is set. I think that when
refreshOptions.SearchResult
for series is set then we should clear all children metadata to make sure that all seasons and episodes are identified correctly after a refresh.Example: An 'X' metadata provider uses IDs for series, seasons and episodes. It misidentified a series, assigned an ID to it, its seasons and all episodes (each episode has it's own unique ID). User uses "Identify" on said series assigning a correct ID but all seasons and episodes are still using old IDs! In this case user has to manually go through all episodes (there may be hundreds of them), remove IDs from all of them by hand and only then "Identify" the parent series.