We now show streaming information on the details page

This commit is contained in:
tidusjar 2021-01-06 16:42:15 +00:00
parent 88453f0a99
commit ea7307ac07
38 changed files with 3267 additions and 154 deletions

View file

@ -249,6 +249,26 @@ namespace Ombi.Core.Engine.V2
return result;
}
public async Task<IEnumerable<StreamingData>> GetStreamInformation(int movieDbId, CancellationToken cancellationToken)
{
var providers = await MovieApi.GetMovieWatchProviders(movieDbId, cancellationToken);
var results = await GetUserWatchProvider(providers);
var data = new List<StreamingData>();
foreach (var result in results)
{
data.Add(new StreamingData
{
Logo = result.logo_path,
Order = result.display_priority,
StreamingProvider = result.provider_name
});
}
return data;
}
protected async Task<List<SearchMovieViewModel>> TransformMovieResultsToResponse(
IEnumerable<MovieSearchResult> movies)
{