diff --git a/MediaBrowser.Api/UserLibrary/ArtistsService.cs b/MediaBrowser.Api/UserLibrary/ArtistsService.cs index 8b1c5ba88..3af6da4b1 100644 --- a/MediaBrowser.Api/UserLibrary/ArtistsService.cs +++ b/MediaBrowser.Api/UserLibrary/ArtistsService.cs @@ -20,6 +20,11 @@ namespace MediaBrowser.Api.UserLibrary { } + [Route("/AlbumArtists", "GET", Summary = "Gets all album artists from a given item, folder, or the entire library")] + public class GetAlbumArtists : GetItemsByName + { + } + [Route("/Artists/{Name}", "GET", Summary = "Gets an artist, by name")] public class GetArtist : IReturn { @@ -101,6 +106,18 @@ namespace MediaBrowser.Api.UserLibrary return ToOptimizedResult(result); } + /// + /// Gets the specified request. + /// + /// The request. + /// System.Object. + public object Get(GetAlbumArtists request) + { + var result = GetResult(request); + + return ToOptimizedResult(result); + } + /// /// Gets all items. /// @@ -109,6 +126,11 @@ namespace MediaBrowser.Api.UserLibrary /// IEnumerable{Tuple{System.StringFunc{System.Int32}}}. protected override IEnumerable GetAllItems(GetItemsByName request, IEnumerable items) { + if (request is GetAlbumArtists) + { + return items.OfType(); + } + return items .OfType() .Where(i => !(i is MusicAlbum))