From cd75df65213f2a4d8ae3f56773ae29a6ec3532a8 Mon Sep 17 00:00:00 2001 From: JPVenson Date: Sun, 19 Jan 2025 12:29:14 +0000 Subject: [PATCH] Applied review comments --- .../Item/BaseItemRepository.cs | 8 +------- .../Controllers/LibraryStructureControllerTests.cs | 2 +- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/Jellyfin.Server.Implementations/Item/BaseItemRepository.cs b/Jellyfin.Server.Implementations/Item/BaseItemRepository.cs index 970eaa3ba1..a4e3f75ec2 100644 --- a/Jellyfin.Server.Implementations/Item/BaseItemRepository.cs +++ b/Jellyfin.Server.Implementations/Item/BaseItemRepository.cs @@ -1216,13 +1216,7 @@ public sealed class BaseItemRepository if (hasSearch) { - List<(ItemSortBy, SortOrder)> prepend = new List<(ItemSortBy, SortOrder)>(4); - if (hasSearch) - { - prepend.Add((ItemSortBy.SortName, SortOrder.Ascending)); - } - - orderBy = filter.OrderBy = [.. prepend, .. orderBy]; + orderBy = filter.OrderBy = [(ItemSortBy.SortName, SortOrder.Ascending), .. orderBy]; } else if (orderBy.Count == 0) { diff --git a/tests/Jellyfin.Server.Integration.Tests/Controllers/LibraryStructureControllerTests.cs b/tests/Jellyfin.Server.Integration.Tests/Controllers/LibraryStructureControllerTests.cs index e7166d4246..0f318f5a0c 100644 --- a/tests/Jellyfin.Server.Integration.Tests/Controllers/LibraryStructureControllerTests.cs +++ b/tests/Jellyfin.Server.Integration.Tests/Controllers/LibraryStructureControllerTests.cs @@ -62,7 +62,7 @@ public sealed class LibraryStructureControllerTests : IClassFixture