mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-05-30 04:18:27 +01:00
Remove unnecessary materializations
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user