aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Api/LibraryService.cs
diff options
context:
space:
mode:
Diffstat (limited to 'MediaBrowser.Api/LibraryService.cs')
-rw-r--r--MediaBrowser.Api/LibraryService.cs16
1 files changed, 2 insertions, 14 deletions
diff --git a/MediaBrowser.Api/LibraryService.cs b/MediaBrowser.Api/LibraryService.cs
index 06b90b32c..3863ef209 100644
--- a/MediaBrowser.Api/LibraryService.cs
+++ b/MediaBrowser.Api/LibraryService.cs
@@ -367,7 +367,7 @@ namespace MediaBrowser.Api
BoxSetCount = boxsets.Count,
BookCount = books.Count,
- UniqueTypes = items.Select(i => i.GetType().Name).Distinct().ToList()
+ UniqueTypes = items.Select(i => i.GetClientTypeName()).Distinct().ToList()
};
var people = items.SelectMany(i => i.People)
@@ -390,19 +390,7 @@ namespace MediaBrowser.Api
people = request.UserId.HasValue ? FilterItems(people, request, request.UserId.Value).ToList() : people;
counts.PersonCount = people.Count;
- var artists = items.OfType<Audio>().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)
+ var artists = _libraryManager.GetAllArtists(items)
.Select(i =>
{
try