aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Api/UserLibrary/PersonsService.cs
diff options
context:
space:
mode:
authorLuke Pulverenti <luke.pulverenti@gmail.com>2013-10-17 11:35:08 -0400
committerLuke Pulverenti <luke.pulverenti@gmail.com>2013-10-17 11:35:08 -0400
commit20014dea8c8f37ba855674d4e27a1af119377f19 (patch)
tree7c4d66fe1f1ba3baaa74a2257547b89c7e518fbb /MediaBrowser.Api/UserLibrary/PersonsService.cs
parentf23e957381eefa8096c220b504669d06db090cb0 (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.cs16
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>