diff options
Diffstat (limited to 'MediaBrowser.Server.Implementations/Dto/DtoService.cs')
| -rw-r--r-- | MediaBrowser.Server.Implementations/Dto/DtoService.cs | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/MediaBrowser.Server.Implementations/Dto/DtoService.cs b/MediaBrowser.Server.Implementations/Dto/DtoService.cs index f9b7470b2..8086033eb 100644 --- a/MediaBrowser.Server.Implementations/Dto/DtoService.cs +++ b/MediaBrowser.Server.Implementations/Dto/DtoService.cs @@ -1175,6 +1175,28 @@ namespace MediaBrowser.Server.Implementations.Dto if (hasAlbumArtist != null) { dto.AlbumArtist = hasAlbumArtist.AlbumArtists.FirstOrDefault(); + + dto.AlbumArtists = hasAlbumArtist + .AlbumArtists + .Select(i => + { + try + { + var artist = _libraryManager.GetArtist(i); + return new NameIdPair + { + Name = artist.Name, + Id = artist.Id.ToString("N") + }; + } + catch (Exception ex) + { + _logger.ErrorException("Error getting album artist", ex); + return null; + } + }) + .Where(i => i != null) + .ToList(); } // Add video info |
