aboutsummaryrefslogtreecommitdiff
path: root/Jellyfin.Server.Implementations/Item/NextUpService.cs
diff options
context:
space:
mode:
authorShadowghost <Ghost_of_Stone@web.de>2026-04-26 17:55:19 +0200
committerShadowghost <Ghost_of_Stone@web.de>2026-04-26 18:53:06 +0200
commitfc866a64e063c9f04df3fab9a00846501c8d2b13 (patch)
tree2d3b040ad903dc0c4205658831c5f66939b1a504 /Jellyfin.Server.Implementations/Item/NextUpService.cs
parentf806ae40187ff5d853fff7cdd72709eab39bc9ac (diff)
Remove unnecessary materializations
Diffstat (limited to 'Jellyfin.Server.Implementations/Item/NextUpService.cs')
-rw-r--r--Jellyfin.Server.Implementations/Item/NextUpService.cs10
1 files changed, 3 insertions, 7 deletions
diff --git a/Jellyfin.Server.Implementations/Item/NextUpService.cs b/Jellyfin.Server.Implementations/Item/NextUpService.cs
index b25b347868..d78e246691 100644
--- a/Jellyfin.Server.Implementations/Item/NextUpService.cs
+++ b/Jellyfin.Server.Implementations/Item/NextUpService.cs
@@ -150,13 +150,9 @@ public class NextUpService : INextUpService
.Where(id => id != Guid.Empty)
.Distinct()
.ToList();
- var lastWatchedEpisodes = new Dictionary<Guid, BaseItemEntity>();
- if (allLastWatchedIds.Count > 0)
- {
- var lwQuery = context.BaseItems.AsNoTracking().Where(e => allLastWatchedIds.Contains(e.Id));
- lwQuery = _queryHelpers.ApplyNavigations(lwQuery, filter);
- lastWatchedEpisodes = lwQuery.ToDictionary(e => e.Id);
- }
+ var lwQuery = context.BaseItems.AsNoTracking().Where(e => allLastWatchedIds.Contains(e.Id));
+ lwQuery = _queryHelpers.ApplyNavigations(lwQuery, filter);
+ var lastWatchedEpisodes = lwQuery.ToDictionary(e => e.Id);
Dictionary<string, List<BaseItemEntity>> specialsBySeriesKey = new();
if (includeSpecials)