mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-10-14 14:36:18 +00:00
Use embedded query
This commit is contained in:
parent
d6240bfa88
commit
5ed3ffdb42
1 changed files with 4 additions and 3 deletions
|
|
@ -266,10 +266,11 @@ public sealed class MovieSimilarItemsProvider : ILocalSimilarItemsProvider<Movie
|
|||
|
||||
if (personSourceRows.Count > 0)
|
||||
{
|
||||
var allPersonIds = personSourceRows.Select(r => r.PeopleId).Distinct().ToList();
|
||||
|
||||
var personCandidateRows = await context.PeopleBaseItemMap.AsNoTracking()
|
||||
.Where(m => allPersonIds.Contains(m.PeopleId))
|
||||
.Where(m => context.PeopleBaseItemMap
|
||||
.Where(s => sourceIds.Contains(s.ItemId) && _scoredPersonTypes.Contains(s.People.PersonType))
|
||||
.Select(s => s.PeopleId)
|
||||
.Contains(m.PeopleId))
|
||||
.Select(m => new { m.ItemId, m.PeopleId })
|
||||
.ToListAsync(cancellationToken).ConfigureAwait(false);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue