diff options
| author | tikuf <admin@nyalindee.com> | 2014-04-07 12:43:29 +1000 |
|---|---|---|
| committer | tikuf <admin@nyalindee.com> | 2014-04-07 12:43:29 +1000 |
| commit | 8ae71b75fb024815e165eba9b3d00ca8307caab3 (patch) | |
| tree | 54274881bca0834c2ab518c51bc65160fc320db1 /MediaBrowser.Server.Implementations/Library/Validators/PeopleValidator.cs | |
| parent | 161e1af0eaa69e828f64d33311e3bc462852d6c4 (diff) | |
| parent | 56c0d491f4c05a2c0c4f21c20e3530c039b33148 (diff) | |
Merge branch 'master' of https://github.com/MediaBrowser/MediaBrowser
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 |
