fixes #772 - "Suggested" duplicates

This commit is contained in:
Luke Pulverenti 2014-06-07 21:38:37 -04:00
parent d2a0abb568
commit ba33637251

View File

@ -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<Movie>()
.ToList();
.OfType<Movie>();
var result = GetRecommendationCategories(user, movies, request.CategoryLimit, request.ItemLimit, request.GetItemFields().ToList());
movies = _libraryManager.ReplaceVideosWithPrimaryVersions(movies).Cast<Movie>();
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());
}