diff options
| author | Luke Pulverenti <luke.pulverenti@gmail.com> | 2014-04-20 21:36:12 -0400 |
|---|---|---|
| committer | Luke Pulverenti <luke.pulverenti@gmail.com> | 2014-04-20 21:36:12 -0400 |
| commit | 3b4be92038bb517385696d6f12f08c23a79eda44 (patch) | |
| tree | 168620b01e67be65b3a190209ed801183b2a36bd /MediaBrowser.Api/UserLibrary/GenresService.cs | |
| parent | 247400717e0768238436a9fdeae268de7c26d8cc (diff) | |
expose more dlna profile settings in the web interface
Diffstat (limited to 'MediaBrowser.Api/UserLibrary/GenresService.cs')
| -rw-r--r-- | MediaBrowser.Api/UserLibrary/GenresService.cs | 14 |
1 files changed, 13 insertions, 1 deletions
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); } } } |
