aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Server.Implementations/Dto/DtoService.cs
diff options
context:
space:
mode:
authorLuke Pulverenti <luke.pulverenti@gmail.com>2013-09-05 15:00:50 -0400
committerLuke Pulverenti <luke.pulverenti@gmail.com>2013-09-05 15:00:50 -0400
commit44b12c0f9fc81dd10d6f655f341d7df28c5f3e20 (patch)
tree520179e21ec80e988e44407b06c2f22f040d9903 /MediaBrowser.Server.Implementations/Dto/DtoService.cs
parentcbf061d5f62a98a977d192bb0117f6c21be7e808 (diff)
fixes #520 - Support multiple artists per audio track
Diffstat (limited to 'MediaBrowser.Server.Implementations/Dto/DtoService.cs')
-rw-r--r--MediaBrowser.Server.Implementations/Dto/DtoService.cs5
1 files changed, 2 insertions, 3 deletions
diff --git a/MediaBrowser.Server.Implementations/Dto/DtoService.cs b/MediaBrowser.Server.Implementations/Dto/DtoService.cs
index 66e3613f55..4ad2479e61 100644
--- a/MediaBrowser.Server.Implementations/Dto/DtoService.cs
+++ b/MediaBrowser.Server.Implementations/Dto/DtoService.cs
@@ -893,7 +893,7 @@ namespace MediaBrowser.Server.Implementations.Dto
{
dto.Album = audio.Album;
dto.AlbumArtist = audio.AlbumArtist;
- dto.Artists = new[] { audio.Artist };
+ dto.Artists = audio.Artists.ToArray();
var albumParent = audio.FindParent<MusicAlbum>();
@@ -919,8 +919,7 @@ namespace MediaBrowser.Server.Implementations.Dto
dto.AlbumArtist = songs.Select(i => i.AlbumArtist).FirstOrDefault(i => !string.IsNullOrEmpty(i));
dto.Artists =
- songs.Select(i => i.Artist ?? string.Empty)
- .Where(i => !string.IsNullOrEmpty(i))
+ songs.SelectMany(i => i.Artists)
.Distinct(StringComparer.OrdinalIgnoreCase)
.ToArray();
}