aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJPVenson <github@jpb.email>2025-09-25 00:22:05 +0300
committerGitHub <noreply@github.com>2025-09-24 15:22:05 -0600
commit740b9924a011c260d9f079d111a47351037d5ad3 (patch)
tree34eaf4c1f505e32f98a00eb9f17c5e6ca81a24e7
parent5a6d9180fed81a30cb91ef3fed30176cd4402116 (diff)
Include ListOrder on Import (#14854)
-rw-r--r--Jellyfin.Server.Implementations/Item/BaseItemRepository.cs2
-rw-r--r--Jellyfin.Server/Migrations/Routines/MigrateLibraryDb.cs5
2 files changed, 4 insertions, 3 deletions
diff --git a/Jellyfin.Server.Implementations/Item/BaseItemRepository.cs b/Jellyfin.Server.Implementations/Item/BaseItemRepository.cs
index 68260fbf0..e08217b66 100644
--- a/Jellyfin.Server.Implementations/Item/BaseItemRepository.cs
+++ b/Jellyfin.Server.Implementations/Item/BaseItemRepository.cs
@@ -481,7 +481,7 @@ public sealed class BaseItemRepository
var counts = dbQuery
.GroupBy(x => x.Type)
.Select(x => new { x.Key, Count = x.Count() })
- .AsEnumerable();
+ .ToArray();
var lookup = _itemTypeLookup.BaseItemKindNames;
var result = new ItemCounts();
diff --git a/Jellyfin.Server/Migrations/Routines/MigrateLibraryDb.cs b/Jellyfin.Server/Migrations/Routines/MigrateLibraryDb.cs
index b8f416a76..f63b7ee62 100644
--- a/Jellyfin.Server/Migrations/Routines/MigrateLibraryDb.cs
+++ b/Jellyfin.Server/Migrations/Routines/MigrateLibraryDb.cs
@@ -319,7 +319,7 @@ internal class MigrateLibraryDb : IDatabaseMigrationRoutine
{
const string personsQuery =
"""
- SELECT ItemId, Name, Role, PersonType, SortOrder FROM People
+ SELECT ItemId, Name, Role, PersonType, SortOrder, ListOrder FROM People
WHERE EXISTS(SELECT 1 FROM TypedBaseItems WHERE TypedBaseItems.guid = People.ItemId)
""";
@@ -347,6 +347,7 @@ internal class MigrateLibraryDb : IDatabaseMigrationRoutine
}
int? sortOrder = reader.IsDBNull(4) ? null : reader.GetInt32(4);
+ int? listOrder = reader.IsDBNull(5) ? null : reader.GetInt32(5);
personCache.Items.Add(new PeopleBaseItemMap()
{
@@ -354,7 +355,7 @@ internal class MigrateLibraryDb : IDatabaseMigrationRoutine
ItemId = itemId,
People = null!,
PeopleId = personCache.Person.Id,
- ListOrder = sortOrder,
+ ListOrder = listOrder,
SortOrder = sortOrder,
Role = role
});