aboutsummaryrefslogtreecommitdiff
path: root/Jellyfin.Server.Implementations
diff options
context:
space:
mode:
authorShadowghost <Ghost_of_Stone@web.de>2026-06-10 08:05:03 +0200
committerShadowghost <Ghost_of_Stone@web.de>2026-06-10 08:05:03 +0200
commit95de28cddad3344df85a452992bdc591b11552f7 (patch)
tree92a7ebfb9fa037316cfd9a24dea3352f46466d1b /Jellyfin.Server.Implementations
parent0874a26131a5a1e9d62fb7231acbaf9eb921b5c8 (diff)
parenteb38f462ad45d9b7848115afdcc17b9f51a9a9a6 (diff)
Merge remote-tracking branch 'upstream/master' into version-model-and-handling
Diffstat (limited to 'Jellyfin.Server.Implementations')
-rw-r--r--Jellyfin.Server.Implementations/Item/ItemPersistenceService.cs4
1 files changed, 3 insertions, 1 deletions
diff --git a/Jellyfin.Server.Implementations/Item/ItemPersistenceService.cs b/Jellyfin.Server.Implementations/Item/ItemPersistenceService.cs
index ffa5cff1f2..7c0cfe7c15 100644
--- a/Jellyfin.Server.Implementations/Item/ItemPersistenceService.cs
+++ b/Jellyfin.Server.Implementations/Item/ItemPersistenceService.cs
@@ -557,9 +557,11 @@ public class ItemPersistenceService : IItemPersistenceService
}
}
+ // Deduplicate; local (file-based) relationships take priority over linked (user-merged)
+ // ones, matching the LinkedChildren migration.
newLinkedChildren = newLinkedChildren
.GroupBy(c => c.ChildId)
- .Select(g => g.Last())
+ .Select(g => g.OrderBy(c => c.Type == LinkedChildType.LocalAlternateVersion ? 0 : 1).First())
.ToList();
var childIdsToCheck = newLinkedChildren.Select(c => c.ChildId).ToList();