aboutsummaryrefslogtreecommitdiff
path: root/Emby.Server.Implementations/Library/Validators/PeopleValidator.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Emby.Server.Implementations/Library/Validators/PeopleValidator.cs')
-rw-r--r--Emby.Server.Implementations/Library/Validators/PeopleValidator.cs17
1 files changed, 5 insertions, 12 deletions
diff --git a/Emby.Server.Implementations/Library/Validators/PeopleValidator.cs b/Emby.Server.Implementations/Library/Validators/PeopleValidator.cs
index c2eb30ee4..39630cf96 100644
--- a/Emby.Server.Implementations/Library/Validators/PeopleValidator.cs
+++ b/Emby.Server.Implementations/Library/Validators/PeopleValidator.cs
@@ -55,28 +55,21 @@ namespace Emby.Server.Implementations.Library.Validators
/// <returns>Task.</returns>
public async Task ValidatePeople(CancellationToken cancellationToken, IProgress<double> progress)
{
- var people = _libraryManager.GetPeople(new InternalPeopleQuery());
-
- var dict = new Dictionary<string, bool>(StringComparer.OrdinalIgnoreCase);
-
- foreach (var person in people)
- {
- dict[person.Name] = true;
- }
+ var people = _libraryManager.GetPeopleNames(new InternalPeopleQuery());
var numComplete = 0;
- _logger.Debug("Will refresh {0} people", dict.Count);
+ var numPeople = people.Count;
- var numPeople = dict.Count;
+ _logger.Debug("Will refresh {0} people", numPeople);
- foreach (var person in dict)
+ foreach (var person in people)
{
cancellationToken.ThrowIfCancellationRequested();
try
{
- var item = _libraryManager.GetPerson(person.Key);
+ var item = _libraryManager.GetPerson(person);
var options = new MetadataRefreshOptions(_fileSystem)
{