fixes #772 - "Suggested" duplicates

pull/702/head
Luke Pulverenti 11 years ago
parent d2a0abb568
commit ba33637251

@ -125,10 +125,11 @@ namespace MediaBrowser.Api.Movies
var user = _userManager.GetUserById(request.UserId.Value); var user = _userManager.GetUserById(request.UserId.Value);
var movies = GetAllLibraryItems(request.UserId, _userManager, _libraryManager, request.ParentId) var movies = GetAllLibraryItems(request.UserId, _userManager, _libraryManager, request.ParentId)
.OfType<Movie>() .OfType<Movie>();
.ToList();
movies = _libraryManager.ReplaceVideosWithPrimaryVersions(movies).Cast<Movie>();
var result = GetRecommendationCategories(user, movies, request.CategoryLimit, request.ItemLimit, request.GetItemFields().ToList()); var result = GetRecommendationCategories(user, movies.ToList(), request.CategoryLimit, request.ItemLimit, request.GetItemFields().ToList());
return ToOptimizedResult(result); 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()); return categories.OrderBy(i => i.RecommendationType).ThenBy(i => Guid.NewGuid());
} }

Loading…
Cancel
Save