mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-10-21 16:22:15 +00:00
Fix version order in migration
This commit is contained in:
parent
edc6caf255
commit
737abe6f3a
1 changed files with 4 additions and 2 deletions
|
|
@ -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(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue