diff --git a/MediaBrowser.Api/UserLibrary/ArtistsService.cs b/MediaBrowser.Api/UserLibrary/ArtistsService.cs index 6bc8a2bead..d9db48a30b 100644 --- a/MediaBrowser.Api/UserLibrary/ArtistsService.cs +++ b/MediaBrowser.Api/UserLibrary/ArtistsService.cs @@ -22,28 +22,6 @@ namespace MediaBrowser.Api.UserLibrary { } - /// - /// Class GetArtistsItemCounts - /// - [Route("/Artists/{Name}/Counts", "GET")] - [Api(Description = "Gets item counts of library items that an artist appears in")] - public class GetArtistsItemCounts : IReturn - { - /// - /// Gets or sets the user id. - /// - /// The user id. - [ApiMember(Name = "UserId", Description = "User Id", IsRequired = true, DataType = "string", ParameterType = "path", Verb = "GET")] - public Guid UserId { get; set; } - - /// - /// Gets or sets the name. - /// - /// The name. - [ApiMember(Name = "Name", Description = "The artist name", IsRequired = true, DataType = "string", ParameterType = "path", Verb = "GET")] - public string Name { get; set; } - } - [Route("/Artists/{Name}", "GET")] [Api(Description = "Gets an artist, by name")] public class GetArtist : IReturn @@ -114,49 +92,6 @@ namespace MediaBrowser.Api.UserLibrary return await DtoService.GetBaseItemDto(item, fields.ToList()).ConfigureAwait(false); } - /// - /// Gets the specified request. - /// - /// The request. - /// System.Object. - public object Get(GetArtistsItemCounts request) - { - var name = DeSlugArtistName(request.Name, LibraryManager); - - var items = GetItems(request.UserId).Where(i => - { - var song = i as Audio; - - if (song != null) - { - return song.HasArtist(name); - } - - var musicVideo = i as MusicVideo; - - if (musicVideo != null) - { - return musicVideo.HasArtist(name); - } - - return false; - - }).ToList(); - - var counts = new ItemByNameCounts - { - TotalCount = items.Count, - - SongCount = items.OfType