mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-12-18 06:53:07 +03:00
Include ListOrder on Import (#14854)
This commit is contained in:
@@ -481,7 +481,7 @@ public sealed class BaseItemRepository
|
|||||||
var counts = dbQuery
|
var counts = dbQuery
|
||||||
.GroupBy(x => x.Type)
|
.GroupBy(x => x.Type)
|
||||||
.Select(x => new { x.Key, Count = x.Count() })
|
.Select(x => new { x.Key, Count = x.Count() })
|
||||||
.AsEnumerable();
|
.ToArray();
|
||||||
|
|
||||||
var lookup = _itemTypeLookup.BaseItemKindNames;
|
var lookup = _itemTypeLookup.BaseItemKindNames;
|
||||||
var result = new ItemCounts();
|
var result = new ItemCounts();
|
||||||
|
|||||||
@@ -319,7 +319,7 @@ internal class MigrateLibraryDb : IDatabaseMigrationRoutine
|
|||||||
{
|
{
|
||||||
const string personsQuery =
|
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)
|
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? sortOrder = reader.IsDBNull(4) ? null : reader.GetInt32(4);
|
||||||
|
int? listOrder = reader.IsDBNull(5) ? null : reader.GetInt32(5);
|
||||||
|
|
||||||
personCache.Items.Add(new PeopleBaseItemMap()
|
personCache.Items.Add(new PeopleBaseItemMap()
|
||||||
{
|
{
|
||||||
@@ -354,7 +355,7 @@ internal class MigrateLibraryDb : IDatabaseMigrationRoutine
|
|||||||
ItemId = itemId,
|
ItemId = itemId,
|
||||||
People = null!,
|
People = null!,
|
||||||
PeopleId = personCache.Person.Id,
|
PeopleId = personCache.Person.Id,
|
||||||
ListOrder = sortOrder,
|
ListOrder = listOrder,
|
||||||
SortOrder = sortOrder,
|
SortOrder = sortOrder,
|
||||||
Role = role
|
Role = role
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user