diff options
| author | Luke Pulverenti <luke.pulverenti@gmail.com> | 2013-09-05 15:00:50 -0400 |
|---|---|---|
| committer | Luke Pulverenti <luke.pulverenti@gmail.com> | 2013-09-05 15:00:50 -0400 |
| commit | 44b12c0f9fc81dd10d6f655f341d7df28c5f3e20 (patch) | |
| tree | 520179e21ec80e988e44407b06c2f22f040d9903 /MediaBrowser.Api/SearchService.cs | |
| parent | cbf061d5f62a98a977d192bb0117f6c21be7e808 (diff) | |
fixes #520 - Support multiple artists per audio track
Diffstat (limited to 'MediaBrowser.Api/SearchService.cs')
| -rw-r--r-- | MediaBrowser.Api/SearchService.cs | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/MediaBrowser.Api/SearchService.cs b/MediaBrowser.Api/SearchService.cs index 33b7422e6..2b3f11761 100644 --- a/MediaBrowser.Api/SearchService.cs +++ b/MediaBrowser.Api/SearchService.cs @@ -196,8 +196,7 @@ namespace MediaBrowser.Api result.SongCount = songs.Count; result.Artists = songs - .Select(i => i.Artist) - .Where(i => !string.IsNullOrEmpty(i)) + .SelectMany(i => i.Artists) .Distinct(StringComparer.OrdinalIgnoreCase) .ToArray(); @@ -210,7 +209,7 @@ namespace MediaBrowser.Api { result.Album = song.Album; result.AlbumArtist = song.AlbumArtist; - result.Artists = !string.IsNullOrEmpty(song.Artist) ? new[] { song.Artist } : new string[] { }; + result.Artists = song.Artists.ToArray(); } return result; |
