mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-07-16 02:02:55 -07:00
Improved the backend in regards to searching
This commit is contained in:
parent
4fb965e782
commit
e5b74d32d0
5 changed files with 16 additions and 8 deletions
|
@ -53,6 +53,10 @@ namespace Ombi.Core.Engine.V2
|
|||
{
|
||||
var tvdbshow = await Cache.GetOrAdd(nameof(GetShowInformation) + tvdbid,
|
||||
async () => await TvMazeApi.ShowLookupByTheTvDbId(tvdbid), DateTime.Now.AddHours(12));
|
||||
if (tvdbshow == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
var show = await Cache.GetOrAdd("GetTvFullInformation" + tvdbshow.id,
|
||||
async () => await TvMazeApi.GetTvFullInformation(tvdbshow.id), DateTime.Now.AddHours(12));
|
||||
if (show == null)
|
||||
|
@ -148,9 +152,9 @@ namespace Ombi.Core.Engine.V2
|
|||
return model;
|
||||
}
|
||||
|
||||
model.Trailer = result.Trailer.AbsoluteUri;
|
||||
model.Trailer = result.Trailer?.AbsoluteUri ?? string.Empty;
|
||||
model.Certification = result.Certification;
|
||||
model.Homepage = result.Homepage.AbsoluteUri;
|
||||
model.Homepage = result.Homepage?.AbsoluteUri ?? string.Empty;
|
||||
|
||||
return model;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue