mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-07-16 02:02:55 -07:00
Fixed #4166 we will now fall back if there are no regional assets to use
This commit is contained in:
parent
a0cc041449
commit
9389d96e73
2 changed files with 20 additions and 4 deletions
|
@ -64,6 +64,22 @@ namespace Ombi.Core.Engine.V2
|
|||
return null;
|
||||
}
|
||||
|
||||
if (!show.Images?.Posters?.Any() ?? false && !string.Equals(langCode, "en", StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
// There's no regional assets for this, so
|
||||
// lookup the en-us version to get them
|
||||
var enShow = await Cache.GetOrAdd(nameof(GetShowInformation) + "en" + tvdbid,
|
||||
async () => await _movieApi.GetTVInfo(tvdbid, "en"), DateTime.Now.AddHours(12));
|
||||
|
||||
// For some of the more obsecure cases
|
||||
if (!show.overview.HasValue())
|
||||
{
|
||||
show.overview = enShow.overview;
|
||||
}
|
||||
|
||||
show.Images = enShow.Images;
|
||||
}
|
||||
|
||||
var mapped = _mapper.Map<SearchFullInfoTvShowViewModel>(show);
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue