diff options
| author | Tim Hobbs <jesus.tesh@gmail.com> | 2014-04-06 11:01:26 -0700 |
|---|---|---|
| committer | Tim Hobbs <jesus.tesh@gmail.com> | 2014-04-06 11:01:26 -0700 |
| commit | 631bba1d3cbcd2e8dc9c84c23d89b910dc8e0113 (patch) | |
| tree | 3ff1455a7dbf551e5752b3c88f9adb3bc9554644 /MediaBrowser.Server.Implementations/Library/Validators/PeopleValidator.cs | |
| parent | 0f88830fd98173815da097c54e5d8d5281dbffd5 (diff) | |
| parent | c60103df64104459883f1244363cc9cd39187545 (diff) | |
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'MediaBrowser.Server.Implementations/Library/Validators/PeopleValidator.cs')
| -rw-r--r-- | MediaBrowser.Server.Implementations/Library/Validators/PeopleValidator.cs | 8 |
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 |
