mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-07-12 16:22:55 -07:00
Added a similar button to the movie searches. Makes movie discoverablility easier
This commit is contained in:
parent
58e658262e
commit
c47cc7f8f2
9 changed files with 59 additions and 4 deletions
|
@ -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>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue