diff --git a/MediaBrowser.Api/Movies/MoviesService.cs b/MediaBrowser.Api/Movies/MoviesService.cs index 285142800..db02ed428 100644 --- a/MediaBrowser.Api/Movies/MoviesService.cs +++ b/MediaBrowser.Api/Movies/MoviesService.cs @@ -125,10 +125,11 @@ namespace MediaBrowser.Api.Movies var user = _userManager.GetUserById(request.UserId.Value); var movies = GetAllLibraryItems(request.UserId, _userManager, _libraryManager, request.ParentId) - .OfType() - .ToList(); + .OfType(); - var result = GetRecommendationCategories(user, movies, request.CategoryLimit, request.ItemLimit, request.GetItemFields().ToList()); + movies = _libraryManager.ReplaceVideosWithPrimaryVersions(movies).Cast(); + + var result = GetRecommendationCategories(user, movies.ToList(), request.CategoryLimit, request.ItemLimit, request.GetItemFields().ToList()); return ToOptimizedResult(result); } @@ -227,15 +228,6 @@ namespace MediaBrowser.Api.Movies } } - //// Get the lead actor for all movies - //var allActors = GetActors(allMovies) - // .ToList(); - - //foreach (var actor in recentActors) - //{ - - //} - return categories.OrderBy(i => i.RecommendationType).ThenBy(i => Guid.NewGuid()); }