diff options
| author | Luke Pulverenti <luke.pulverenti@gmail.com> | 2013-10-17 11:35:08 -0400 |
|---|---|---|
| committer | Luke Pulverenti <luke.pulverenti@gmail.com> | 2013-10-17 11:35:08 -0400 |
| commit | 20014dea8c8f37ba855674d4e27a1af119377f19 (patch) | |
| tree | 7c4d66fe1f1ba3baaa74a2257547b89c7e518fbb /MediaBrowser.Api/UserLibrary/PersonsService.cs | |
| parent | f23e957381eefa8096c220b504669d06db090cb0 (diff) | |
Don't fail people retrieval when one fails to load
Diffstat (limited to 'MediaBrowser.Api/UserLibrary/PersonsService.cs')
| -rw-r--r-- | MediaBrowser.Api/UserLibrary/PersonsService.cs | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/MediaBrowser.Api/UserLibrary/PersonsService.cs b/MediaBrowser.Api/UserLibrary/PersonsService.cs index 2df6cacda..885a4a3e6 100644 --- a/MediaBrowser.Api/UserLibrary/PersonsService.cs +++ b/MediaBrowser.Api/UserLibrary/PersonsService.cs @@ -131,8 +131,20 @@ namespace MediaBrowser.Api.UserLibrary .Select(i => i.Name) .Distinct(StringComparer.OrdinalIgnoreCase) - .Select(name => LibraryManager.GetPerson(name) - ); + .Select(name => + { + try + { + return LibraryManager.GetPerson(name); + } + catch + { + return null; + // Already logged at lower levels + } + } + + ).Where(i => i != null); } /// <summary> |
