mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-05-03 23:36:38 +01:00
Fix version order in migration
This commit is contained in:
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user