diff options
| author | Luke Pulverenti <luke.pulverenti@gmail.com> | 2013-09-06 15:17:15 -0400 |
|---|---|---|
| committer | Luke Pulverenti <luke.pulverenti@gmail.com> | 2013-09-06 15:17:15 -0400 |
| commit | 1d9c163f5ff0207442ff008d8799a5bc602c3d39 (patch) | |
| tree | 424dac5f9cb1cba36d1fe8fb6f3581cf0aeb5a99 /MediaBrowser.Server.Implementations/Dto | |
| parent | 83dd13cc7c72b8f63f049db3ed5582ef084426aa (diff) | |
fixes #506 - Song list - make columns headers clickable for sorting
Diffstat (limited to 'MediaBrowser.Server.Implementations/Dto')
| -rw-r--r-- | MediaBrowser.Server.Implementations/Dto/DtoService.cs | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/MediaBrowser.Server.Implementations/Dto/DtoService.cs b/MediaBrowser.Server.Implementations/Dto/DtoService.cs index 4ad2479e61..46dfd0ba37 100644 --- a/MediaBrowser.Server.Implementations/Dto/DtoService.cs +++ b/MediaBrowser.Server.Implementations/Dto/DtoService.cs @@ -892,7 +892,6 @@ namespace MediaBrowser.Server.Implementations.Dto if (audio != null) { dto.Album = audio.Album; - dto.AlbumArtist = audio.AlbumArtist; dto.Artists = audio.Artists.ToArray(); var albumParent = audio.FindParent<MusicAlbum>(); @@ -916,14 +915,19 @@ namespace MediaBrowser.Server.Implementations.Dto { var songs = album.RecursiveChildren.OfType<Audio>().ToList(); - dto.AlbumArtist = songs.Select(i => i.AlbumArtist).FirstOrDefault(i => !string.IsNullOrEmpty(i)); - dto.Artists = songs.SelectMany(i => i.Artists) .Distinct(StringComparer.OrdinalIgnoreCase) .ToArray(); } + var hasAlbumArtist = item as IHasAlbumArtist; + + if (hasAlbumArtist != null) + { + dto.AlbumArtist = hasAlbumArtist.AlbumArtist; + } + // Add video info var video = item as Video; if (video != null) |
