Added a similar button to the movie searches. Makes movie discoverablility easier

This commit is contained in:
tidusjar 2018-02-28 12:17:03 +00:00
parent 58e658262e
commit c47cc7f8f2
9 changed files with 59 additions and 4 deletions

View file

@ -63,6 +63,22 @@ namespace Ombi.Core.Engine
return null;
}
/// <summary>
/// Get similar movies to the id passed in
/// </summary>
/// <param name="theMovieDbId"></param>
/// <returns></returns>
public async Task<IEnumerable<SearchMovieViewModel>> SimilarMovies(int theMovieDbId)
{
var result = await MovieApi.SimilarMovies(theMovieDbId);
if (result != null)
{
Logger.LogDebug("Search Result: {result}", result);
return await TransformMovieResultsToResponse(result.Take(10)); // Take 10 to stop us overloading the API
}
return null;
}
/// <summary>
/// Gets popular movies.
/// </summary>