Merge pull request #16995 from theguymadmax/fix-flat-series
Some checks are pending
CodeQL / Analyze (csharp) (push) Waiting to run
Format / format-check (push) Waiting to run
Tests / run-tests (macos-latest) (push) Waiting to run
Tests / run-tests (ubuntu-latest) (push) Waiting to run
Tests / run-tests (windows-latest) (push) Waiting to run
OpenAPI Publish / OpenAPI - Publish Artifact (push) Waiting to run
OpenAPI Publish / OpenAPI - Publish Unstable Spec (push) Blocked by required conditions
OpenAPI Publish / OpenAPI - Publish Stable Spec (push) Blocked by required conditions
Project Automation / Project board (push) Waiting to run
Merge Conflict Labeler / Labeling (push) Waiting to run

Fix season unknown for flat TV structures
This commit is contained in:
Bond-009
2026-06-03 19:48:37 +02:00
committed by GitHub

View File

@@ -210,16 +210,19 @@ public class SeriesMetadataService : MetadataService<Series, SeriesInfo>
return true;
}
// Not yet processed
if (episode.SeasonId.IsEmpty())
// Episode has been processed and linked to a season, only needs a virtual season
// if it isn't already linked to a known physical season by ID or path
if (!episode.SeasonId.IsEmpty())
{
return false;
return !physicalSeasonIds.Contains(episode.SeasonId)
&& !physicalSeasonPaths.Contains(System.IO.Path.GetDirectoryName(episode.Path) ?? string.Empty);
}
// Episode has been processed, only needs a virtual season if it isn't
// already linked to a known physical season by ID or path
return !physicalSeasonIds.Contains(episode.SeasonId)
&& !physicalSeasonPaths.Contains(System.IO.Path.GetDirectoryName(episode.Path) ?? string.Empty);
// Episode not yet linked, check if it's in a physical season folder
// If yes then skip it, processing not finished
// If no then include it, needs Season Unknown
var episodeDirectory = System.IO.Path.GetDirectoryName(episode.Path) ?? string.Empty;
return !physicalSeasonPaths.Contains(episodeDirectory);
}
/// <summary>