diff options
| author | Niels van Velzen <nielsvanvelzen@users.noreply.github.com> | 2026-11-06 20:12:19 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-11-06 20:12:19 +0100 |
| commit | 797999fc9bd49a9f0853916e2933e3ad06173503 (patch) | |
| tree | 22010d5401321d03c80d717d12d758bdc95060e7 | |
| parent | 6a5a910d1b182400b3f026226fc099f3a0ec8b51 (diff) | |
| parent | f45146706b229b50ae6297591bf87a624af25e19 (diff) | |
Fixed bodged merge
| -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) |
