fixes #769 - Artists pages don't include music videos

This commit is contained in:
Luke Pulverenti
2014-04-06 22:10:38 -04:00
parent e8a88b41ab
commit 56c0d491f4
4 changed files with 29 additions and 9 deletions

View File

@@ -15,14 +15,12 @@ namespace MediaBrowser.Api.UserLibrary
/// <summary>
/// Class GetArtists
/// </summary>
[Route("/Artists", "GET")]
[Api(Description = "Gets all artists from a given item, folder, or the entire library")]
[Route("/Artists", "GET", Summary = "Gets all artists from a given item, folder, or the entire library")]
public class GetArtists : GetItemsByName
{
}
[Route("/Artists/{Name}", "GET")]
[Api(Description = "Gets an artist, by name")]
[Route("/Artists/{Name}", "GET", Summary = "Gets an artist, by name")]
public class GetArtist : IReturn<BaseItemDto>
{
/// <summary>
@@ -112,7 +110,7 @@ namespace MediaBrowser.Api.UserLibrary
protected override IEnumerable<MusicArtist> GetAllItems(GetItemsByName request, IEnumerable<BaseItem> items)
{
return items
.OfType<Audio>()
.OfType<IHasArtist>()
.SelectMany(i => i.AllArtists)
.Distinct(StringComparer.OrdinalIgnoreCase)
.Select(name =>