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/UserLibrary/ArtistsService.cs | |
| parent | cbf061d5f62a98a977d192bb0117f6c21be7e808 (diff) | |
fixes #520 - Support multiple artists per audio track
Diffstat (limited to 'MediaBrowser.Api/UserLibrary/ArtistsService.cs')
| -rw-r--r-- | MediaBrowser.Api/UserLibrary/ArtistsService.cs | 23 |
1 files changed, 10 insertions, 13 deletions
diff --git a/MediaBrowser.Api/UserLibrary/ArtistsService.cs b/MediaBrowser.Api/UserLibrary/ArtistsService.cs index 3213b2e67..6bc8a2bea 100644 --- a/MediaBrowser.Api/UserLibrary/ArtistsService.cs +++ b/MediaBrowser.Api/UserLibrary/ArtistsService.cs @@ -181,20 +181,17 @@ namespace MediaBrowser.Api.UserLibrary return itemsList .SelectMany(i => + { + var list = new List<string>(); + + if (!string.IsNullOrEmpty(i.AlbumArtist)) { - var list = new List<string>(); - - if (!string.IsNullOrEmpty(i.AlbumArtist)) - { - list.Add(i.AlbumArtist); - } - if (!string.IsNullOrEmpty(i.Artist)) - { - list.Add(i.Artist); - } - - return list; - }) + list.Add(i.AlbumArtist); + } + list.AddRange(i.Artists); + + return list; + }) .Distinct(StringComparer.OrdinalIgnoreCase) .Select(name => new IbnStub<Artist>(name, () => itemsList.Where(i => i.HasArtist(name)), GetEntity)); } |
