diff --git a/MediaBrowser.Api/UserLibrary/ItemsService.cs b/MediaBrowser.Api/UserLibrary/ItemsService.cs index 7c022af7e..59b2ebe41 100644 --- a/MediaBrowser.Api/UserLibrary/ItemsService.cs +++ b/MediaBrowser.Api/UserLibrary/ItemsService.cs @@ -181,6 +181,8 @@ namespace MediaBrowser.Api.UserLibrary var items = GetItemsToSerialize(request, user); + items = items.AsParallel(); + // Apply filters // Run them starting with the ones that are likely to reduce the list the most foreach (var filter in GetFilters(request).OrderByDescending(f => (int)f)) @@ -190,6 +192,8 @@ namespace MediaBrowser.Api.UserLibrary items = ApplyAdditionalFilters(request, items); + items = items.AsEnumerable(); + items = ApplySearchTerm(request, items); items = ApplySortOrder(request, items, user);