mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-07-11 15:56:05 -07:00
Fixed some exceptions being thrown on the backend, nothing that intresting really
This commit is contained in:
parent
5059e2ae0f
commit
598c0cfb99
2 changed files with 18 additions and 11 deletions
|
@ -59,7 +59,12 @@ namespace Ombi.Core.Engine
|
|||
{
|
||||
continue;
|
||||
}
|
||||
retVal.Add(await ProcessResult(tvMazeSearch, false));
|
||||
var mappedResult = await ProcessResult(tvMazeSearch, false);
|
||||
if (mappedResult == null)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
retVal.Add(mappedResult);
|
||||
}
|
||||
return retVal;
|
||||
}
|
||||
|
@ -194,7 +199,7 @@ namespace Ombi.Core.Engine
|
|||
foreach (var tvMazeSearch in items)
|
||||
{
|
||||
var result = await ProcessResult(tvMazeSearch, includeImages);
|
||||
if(settings.HideAvailableFromDiscover && result.Available)
|
||||
if (result == null || settings.HideAvailableFromDiscover && result.Available)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
@ -211,15 +216,17 @@ namespace Ombi.Core.Engine
|
|||
|
||||
private async Task<SearchTvShowViewModel> ProcessResult(SearchTvShowViewModel item, bool includeImages)
|
||||
{
|
||||
if (item.Id == 0)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
item.TheTvDbId = item.Id.ToString();
|
||||
if (includeImages)
|
||||
{
|
||||
|
||||
if (item.TheTvDbId.HasValue())
|
||||
{
|
||||
item.BackdropPath = await _imageService.GetTvBackground(item.TheTvDbId);
|
||||
}
|
||||
|
||||
if (item.TheTvDbId.HasValue())
|
||||
{
|
||||
item.BackdropPath = await _imageService.GetTvBackground(item.TheTvDbId);
|
||||
}
|
||||
}
|
||||
|
||||
await RunSearchRules(item);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue