Save the language code against the request so we can use it later e.g. Sending to the DVR apps

This commit is contained in:
tidusjar 2019-01-04 20:57:05 +00:00
parent 7755053ba0
commit 9cc9bf7e78
9 changed files with 1248 additions and 6 deletions

View file

@ -51,7 +51,7 @@ namespace Ombi.Core.Engine
/// <returns></returns>
public async Task<RequestEngineResult> RequestMovie(MovieRequestViewModel model)
{
var movieInfo = await MovieApi.GetMovieInformationWithExtraInfo(model.TheMovieDbId);
var movieInfo = await MovieApi.GetMovieInformationWithExtraInfo(model.TheMovieDbId, model.LanguageCode);
if (movieInfo == null || movieInfo.Id == 0)
{
return new RequestEngineResult
@ -82,7 +82,8 @@ namespace Ombi.Core.Engine
RequestedDate = DateTime.UtcNow,
Approved = false,
RequestedUserId = userDetails.Id,
Background = movieInfo.BackdropPath
Background = movieInfo.BackdropPath,
LangCode = model.LanguageCode
};
var usDates = movieInfo.ReleaseDates?.Results?.FirstOrDefault(x => x.IsoCode == "US");