diff options
Diffstat (limited to 'Jellyfin.Server.Implementations')
| -rw-r--r-- | Jellyfin.Server.Implementations/Item/ItemCountBuilder.cs | 4 | ||||
| -rw-r--r-- | Jellyfin.Server.Implementations/Item/ItemCountService.cs | 6 |
2 files changed, 5 insertions, 5 deletions
diff --git a/Jellyfin.Server.Implementations/Item/ItemCountBuilder.cs b/Jellyfin.Server.Implementations/Item/ItemCountBuilder.cs index 0f8a1b9dfe..0fb6721d74 100644 --- a/Jellyfin.Server.Implementations/Item/ItemCountBuilder.cs +++ b/Jellyfin.Server.Implementations/Item/ItemCountBuilder.cs @@ -73,6 +73,10 @@ internal static class ItemCountBuilder { result.BookCount += count; } + else if (string.Equals(type, lookup[BaseItemKind.AudioBook], StringComparison.Ordinal)) + { + result.AudioBookCount += count; + } } result.ItemCount = result.TotalItemCount(); diff --git a/Jellyfin.Server.Implementations/Item/ItemCountService.cs b/Jellyfin.Server.Implementations/Item/ItemCountService.cs index 61a2caa253..b0af08479d 100644 --- a/Jellyfin.Server.Implementations/Item/ItemCountService.cs +++ b/Jellyfin.Server.Implementations/Item/ItemCountService.cs @@ -7,7 +7,6 @@ using System.Linq; using Jellyfin.Data.Enums; using Jellyfin.Database.Implementations; using Jellyfin.Database.Implementations.Entities; -using Jellyfin.Database.Implementations.Enums; using Jellyfin.Extensions; using MediaBrowser.Controller.Entities; using MediaBrowser.Controller.Persistence; @@ -72,6 +71,7 @@ public class ItemCountService : IItemCountService { ItemCount = counts.Sum(c => c.Count) }; + foreach (var count in counts) { if (string.Equals(count.Key, lookup[BaseItemKind.MusicAlbum], StringComparison.Ordinal)) @@ -298,10 +298,6 @@ public class ItemCountService : IItemCountService { years.Add(year); } - else if (string.Equals(count.Key, lookup[BaseItemKind.AudioBook], StringComparison.Ordinal)) - { - result.AudioBookCount = count.Count; - } } if (years.Count == 0) |
