diff options
| author | Shadowghost <Ghost_of_Stone@web.de> | 2026-05-04 21:42:31 +0200 |
|---|---|---|
| committer | Shadowghost <Ghost_of_Stone@web.de> | 2026-05-04 21:42:31 +0200 |
| commit | 0d58c773f9ffa33794bd272d1b0783603e2e46d6 (patch) | |
| tree | b8d8c13eaf9448359970d4a6f82ae2a1acd2a15a /Jellyfin.Server.Implementations | |
| parent | 2365cea6260d9b25ef80a2350caf631020a254cb (diff) | |
Fix review comments
Diffstat (limited to 'Jellyfin.Server.Implementations')
| -rw-r--r-- | Jellyfin.Server.Implementations/Item/BaseItemRepository.Querying.cs | 4 | ||||
| -rw-r--r-- | Jellyfin.Server.Implementations/Item/BaseItemRepository.cs | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/Jellyfin.Server.Implementations/Item/BaseItemRepository.Querying.cs b/Jellyfin.Server.Implementations/Item/BaseItemRepository.Querying.cs index b7b40e76d8..85f49eeadd 100644 --- a/Jellyfin.Server.Implementations/Item/BaseItemRepository.Querying.cs +++ b/Jellyfin.Server.Implementations/Item/BaseItemRepository.Querying.cs @@ -145,13 +145,11 @@ public sealed partial class BaseItemRepository } // Albums whose Id is the parent of any track matching the user's filter. - var musicAlbumType = _itemTypeLookup.BaseItemKindNames[BaseItemKind.MusicAlbum]!; - var albumIdsWithMatchingTrack = context.AncestorIds .Join(baseQuery, ai => ai.ItemId, t => t.Id, (ai, _) => ai.ParentItemId); var topAlbumsQuery = context.BaseItems.AsNoTracking() - .Where(album => album.Type == musicAlbumType) + .Where(album => album.Type == _musicAlbumTypeName) .Where(album => albumIdsWithMatchingTrack.Contains(album.Id)) .OrderByDescending(album => album.DateCreated) .ThenByDescending(album => album.Id); diff --git a/Jellyfin.Server.Implementations/Item/BaseItemRepository.cs b/Jellyfin.Server.Implementations/Item/BaseItemRepository.cs index 94dedaeba8..e2c77437a8 100644 --- a/Jellyfin.Server.Implementations/Item/BaseItemRepository.cs +++ b/Jellyfin.Server.Implementations/Item/BaseItemRepository.cs @@ -39,6 +39,7 @@ public sealed partial class BaseItemRepository private readonly IItemTypeLookup _itemTypeLookup; private readonly IServerConfigurationManager _serverConfigurationManager; private readonly ILogger<BaseItemRepository> _logger; + private readonly string _musicAlbumTypeName; private static readonly IReadOnlyList<ItemValueType> _getAllArtistsValueTypes = [ItemValueType.Artist, ItemValueType.AlbumArtist]; private static readonly IReadOnlyList<ItemValueType> _getArtistValueTypes = [ItemValueType.Artist]; @@ -66,6 +67,7 @@ public sealed partial class BaseItemRepository _itemTypeLookup = itemTypeLookup; _serverConfigurationManager = serverConfigurationManager; _logger = logger; + _musicAlbumTypeName = itemTypeLookup.BaseItemKindNames[BaseItemKind.MusicAlbum]!; } /// <summary> |
