fixes #520 - Support multiple artists per audio track

This commit is contained in:
Luke Pulverenti
2013-09-05 15:00:50 -04:00
parent cbf061d5f6
commit 44b12c0f9f
15 changed files with 109 additions and 52 deletions

View File

@@ -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>();
list.Add(i.AlbumArtist);
}
list.AddRange(i.Artists);
if (!string.IsNullOrEmpty(i.AlbumArtist))
{
list.Add(i.AlbumArtist);
}
if (!string.IsNullOrEmpty(i.Artist))
{
list.Add(i.Artist);
}
return list;
})
return list;
})
.Distinct(StringComparer.OrdinalIgnoreCase)
.Select(name => new IbnStub<Artist>(name, () => itemsList.Where(i => i.HasArtist(name)), GetEntity));
}