diff options
| author | Luke Pulverenti <luke.pulverenti@gmail.com> | 2014-03-09 18:14:44 -0400 |
|---|---|---|
| committer | Luke Pulverenti <luke.pulverenti@gmail.com> | 2014-03-09 18:14:44 -0400 |
| commit | d49494476770b3c0a091841bd3bbd44862fb8137 (patch) | |
| tree | f0bf4bffa8b4d8a91de9e9096941aa34082a8e91 /MediaBrowser.Api/SearchService.cs | |
| parent | 1ead63b0d1a532cf828a4ed7c5310eef9c255740 (diff) | |
calculate item by name counts on the fly
Diffstat (limited to 'MediaBrowser.Api/SearchService.cs')
| -rw-r--r-- | MediaBrowser.Api/SearchService.cs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/MediaBrowser.Api/SearchService.cs b/MediaBrowser.Api/SearchService.cs index 455cf6a50c..f46c6b8e30 100644 --- a/MediaBrowser.Api/SearchService.cs +++ b/MediaBrowser.Api/SearchService.cs @@ -1,4 +1,5 @@ -using MediaBrowser.Controller.Drawing; +using System; +using MediaBrowser.Controller.Drawing; using MediaBrowser.Controller.Dto; using MediaBrowser.Controller.Entities; using MediaBrowser.Controller.Entities.Audio; @@ -210,7 +211,8 @@ namespace MediaBrowser.Api result.SongCount = songs.Count; - result.Artists = _libraryManager.GetAllArtists(songs) + result.Artists = songs.SelectMany(i => i.AllArtists) + .Distinct(StringComparer.OrdinalIgnoreCase) .ToArray(); result.AlbumArtist = songs.Select(i => i.AlbumArtist).FirstOrDefault(i => !string.IsNullOrEmpty(i)); |
