The Free Software Media System - Server Backend & API
Fix version order in migration
Shadowghost737abe6f3a48
diff --git a/Jellyfin.Server/Migrations/Routines/MigrateLinkedChildren.cs b/Jellyfin.Server/Migrations/Routines/MigrateLinkedChildren.csindex 9dfb8be900..c1de002e38 100644--- a/Jellyfin.Server/Migrations/Routines/MigrateLinkedChildren.cs+++ b/Jellyfin.Server/Migrations/Routines/MigrateLinkedChildren.cs@@ -315,6 +315,8 @@ internal class MigrateLinkedChildren : IDatabaseMigrationRoutineDictionary<string, Guid> pathToIdMap,List<LinkedChildEntity> linkedChildrenToAdd){+ int sortOrder = 0;+if (root.TryGetProperty("LocalAlternateVersions", out var localAlternateVersionsElement)&& localAlternateVersionsElement.ValueKind == JsonValueKind.Array){@@ -339,7 +341,7 @@ internal class MigrateLinkedChildren : IDatabaseMigrationRoutineParentId = parentId,ChildId = childId,ChildType = LinkedChildType.LocalAlternateVersion,- SortOrder = null+ SortOrder = sortOrder++});_logger.LogDebug(@@ -412,7 +414,7 @@ internal class MigrateLinkedChildren : IDatabaseMigrationRoutineParentId = parentId,ChildId = childId.Value,ChildType = LinkedChildType.LinkedAlternateVersion,- SortOrder = null+ SortOrder = sortOrder++});_logger.LogDebug(