Support stacked multi versions

This commit is contained in:
Shadowghost
2026-05-13 21:17:40 +02:00
parent 7f5ff3dabd
commit c91f640d37
4 changed files with 165 additions and 50 deletions

View File

@@ -296,10 +296,13 @@ namespace Emby.Naming.Video
}
}
var primary = primaryOverride ?? videos[0];
// Prefer a stacked entry (more than one part) as primary
var primary = primaryOverride
?? videos.FirstOrDefault(v => v.Files.Count > 1)
?? videos[0];
videos.Remove(primary);
primary.AlternateVersions = [.. videos.Select(x => x.Files[0])];
primary.AlternateVersions = videos;
if (nameOverride is not null)
{