mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-08-19 12:59:39 -07:00
TV results now respect the users set language
This commit is contained in:
parent
16b2b849d4
commit
a578374588
1 changed files with 4 additions and 3 deletions
|
@ -50,13 +50,14 @@ namespace Ombi.Core.Engine.V2
|
||||||
public async Task<SearchFullInfoTvShowViewModel> GetShowByRequest(int requestId, CancellationToken token)
|
public async Task<SearchFullInfoTvShowViewModel> GetShowByRequest(int requestId, CancellationToken token)
|
||||||
{
|
{
|
||||||
var request = await RequestService.TvRequestService.Get().FirstOrDefaultAsync(x => x.Id == requestId);
|
var request = await RequestService.TvRequestService.Get().FirstOrDefaultAsync(x => x.Id == requestId);
|
||||||
return await GetShowInformation(request.ExternalProviderId.ToString(), token); // TODO
|
return await GetShowInformation(request.ExternalProviderId.ToString(), token);
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task<SearchFullInfoTvShowViewModel> GetShowInformation(string tvdbid, CancellationToken token)
|
public async Task<SearchFullInfoTvShowViewModel> GetShowInformation(string tvdbid, CancellationToken token)
|
||||||
{
|
{
|
||||||
var show = await Cache.GetOrAdd(nameof(GetShowInformation) + tvdbid,
|
var langCode = await DefaultLanguageCode(null);
|
||||||
async () => await _movieApi.GetTVInfo(tvdbid), DateTime.Now.AddHours(12));
|
var show = await Cache.GetOrAdd(nameof(GetShowInformation) + langCode + tvdbid,
|
||||||
|
async () => await _movieApi.GetTVInfo(tvdbid, langCode), DateTime.Now.AddHours(12));
|
||||||
if (show == null || show.name == null)
|
if (show == null || show.name == null)
|
||||||
{
|
{
|
||||||
// We don't have enough information
|
// We don't have enough information
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue