diff options
| author | Shadowghost <Ghost_of_Stone@web.de> | 2026-02-09 09:13:05 +0100 |
|---|---|---|
| committer | Shadowghost <Ghost_of_Stone@web.de> | 2026-02-09 09:13:05 +0100 |
| commit | 737abe6f3a48a1fa792ff2d24dad45a04880717f (patch) | |
| tree | 3744c9acca0b019ee6cf2875aba8771aa62edc88 | |
| parent | edc6caf255da2cb5fd5aef51d58a168ae0f39cb3 (diff) | |
Fix version order in migration
| -rw-r--r-- | Jellyfin.Server/Migrations/Routines/MigrateLinkedChildren.cs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/Jellyfin.Server/Migrations/Routines/MigrateLinkedChildren.cs b/Jellyfin.Server/Migrations/Routines/MigrateLinkedChildren.cs index 9dfb8be900..c1de002e38 100644 --- a/Jellyfin.Server/Migrations/Routines/MigrateLinkedChildren.cs +++ b/Jellyfin.Server/Migrations/Routines/MigrateLinkedChildren.cs @@ -315,6 +315,8 @@ internal class MigrateLinkedChildren : IDatabaseMigrationRoutine Dictionary<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 : IDatabaseMigrationRoutine ParentId = parentId, ChildId = childId, ChildType = LinkedChildType.LocalAlternateVersion, - SortOrder = null + SortOrder = sortOrder++ }); _logger.LogDebug( @@ -412,7 +414,7 @@ internal class MigrateLinkedChildren : IDatabaseMigrationRoutine ParentId = parentId, ChildId = childId.Value, ChildType = LinkedChildType.LinkedAlternateVersion, - SortOrder = null + SortOrder = sortOrder++ }); _logger.LogDebug( |
