From 3b4be92038bb517385696d6f12f08c23a79eda44 Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Sun, 20 Apr 2014 21:36:12 -0400 Subject: expose more dlna profile settings in the web interface --- MediaBrowser.Api/UserLibrary/GenresService.cs | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'MediaBrowser.Api/UserLibrary/GenresService.cs') diff --git a/MediaBrowser.Api/UserLibrary/GenresService.cs b/MediaBrowser.Api/UserLibrary/GenresService.cs index 5d362c61a..58dec11f6 100644 --- a/MediaBrowser.Api/UserLibrary/GenresService.cs +++ b/MediaBrowser.Api/UserLibrary/GenresService.cs @@ -110,7 +110,19 @@ namespace MediaBrowser.Api.UserLibrary return items .SelectMany(i => i.Genres) .Distinct(StringComparer.OrdinalIgnoreCase) - .Select(name => LibraryManager.GetGenre(name)); + .Select(name => + { + try + { + return LibraryManager.GetGenre(name); + } + catch (Exception ex) + { + Logger.ErrorException("Error getting genre {0}", ex, name); + return null; + } + }) + .Where(i => i != null); } } } -- cgit v1.2.3