aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Server.Implementations/Library/Validators/PeopleValidator.cs
diff options
context:
space:
mode:
Diffstat (limited to 'MediaBrowser.Server.Implementations/Library/Validators/PeopleValidator.cs')
-rw-r--r--MediaBrowser.Server.Implementations/Library/Validators/PeopleValidator.cs8
1 files changed, 5 insertions, 3 deletions
diff --git a/MediaBrowser.Server.Implementations/Library/Validators/PeopleValidator.cs b/MediaBrowser.Server.Implementations/Library/Validators/PeopleValidator.cs
index 722c24a10..b7af8beeb 100644
--- a/MediaBrowser.Server.Implementations/Library/Validators/PeopleValidator.cs
+++ b/MediaBrowser.Server.Implementations/Library/Validators/PeopleValidator.cs
@@ -50,7 +50,9 @@ namespace MediaBrowser.Server.Implementations.Library.Validators
var people = _libraryManager.RootFolder.GetRecursiveChildren()
.SelectMany(c => c.People)
- .DistinctBy(p => p.Name, StringComparer.OrdinalIgnoreCase)
+ .Where(i => !string.IsNullOrWhiteSpace(i.Name))
+ .Select(i => i.Name)
+ .Distinct(StringComparer.OrdinalIgnoreCase)
.ToList();
var numComplete = 0;
@@ -61,13 +63,13 @@ namespace MediaBrowser.Server.Implementations.Library.Validators
try
{
- var item = _libraryManager.GetPerson(person.Name);
+ var item = _libraryManager.GetPerson(person);
await item.RefreshMetadata(options, cancellationToken).ConfigureAwait(false);
}
catch (Exception ex)
{
- _logger.ErrorException("Error validating IBN entry {0}", ex, person.Name);
+ _logger.ErrorException("Error validating IBN entry {0}", ex, person);
}
// Update progress