Release Polish 3 (#3359)

This commit is contained in:
Joe Milazzo 2024-11-12 13:04:43 -06:00 committed by GitHub
parent dd3dec269f
commit f812f61001
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
34 changed files with 211 additions and 134 deletions

View file

@ -334,7 +334,10 @@ public class SeriesService : ISeriesService
private async Task HandlePeopleUpdateAsync(SeriesMetadata metadata, ICollection<PersonDto> peopleDtos, PersonRole role)
{
// Normalize all names from the DTOs
var normalizedNames = peopleDtos.Select(p => Parser.Normalize(p.Name)).ToList();
var normalizedNames = peopleDtos
.Select(p => Parser.Normalize(p.Name))
.Distinct()
.ToList();
// Bulk select people who already exist in the database
var existingPeople = await _unitOfWork.PersonRepository.GetPeopleByNames(normalizedNames);