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/BaseApiService.cs | |
| parent | cbf061d5f62a98a977d192bb0117f6c21be7e808 (diff) | |
fixes #520 - Support multiple artists per audio track
Diffstat (limited to 'MediaBrowser.Api/BaseApiService.cs')
| -rw-r--r-- | MediaBrowser.Api/BaseApiService.cs | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/MediaBrowser.Api/BaseApiService.cs b/MediaBrowser.Api/BaseApiService.cs index f4b14d5a8..81c2d43e4 100644 --- a/MediaBrowser.Api/BaseApiService.cs +++ b/MediaBrowser.Api/BaseApiService.cs @@ -140,8 +140,18 @@ namespace MediaBrowser.Api return libraryManager.RootFolder.RecursiveChildren .OfType<Audio>() - .SelectMany(i => new[] { i.Artist, i.AlbumArtist }) - .Where(i => !string.IsNullOrEmpty(i)) + .SelectMany(i => + { + var list = new List<string>(); + + if (!string.IsNullOrEmpty(i.AlbumArtist)) + { + list.Add(i.AlbumArtist); + } + list.AddRange(i.Artists); + + return list; + }) .Distinct(StringComparer.OrdinalIgnoreCase) .FirstOrDefault(i => { |
