diff --git a/src/Ombi.Core/Engine/V2/MovieSearchEngineV2.cs b/src/Ombi.Core/Engine/V2/MovieSearchEngineV2.cs index 46b8e0361..a27f89120 100644 --- a/src/Ombi.Core/Engine/V2/MovieSearchEngineV2.cs +++ b/src/Ombi.Core/Engine/V2/MovieSearchEngineV2.cs @@ -262,6 +262,7 @@ namespace Ombi.Core.Engine.V2 var mapped = Mapper.Map(movie); mapped.Available = viewMovie.Available; + mapped.Approved = viewMovie.Approved; mapped.RequestId = viewMovie.RequestId; mapped.Requested = viewMovie.Requested; mapped.PlexUrl = viewMovie.PlexUrl; @@ -286,6 +287,7 @@ namespace Ombi.Core.Engine.V2 var mapped = Mapper.Map(movie); mapped.Available = movie.Available; + mapped.Approved = movie.Approved; mapped.RequestId = movie.RequestId; mapped.Requested = movie.Requested; mapped.PlexUrl = movie.PlexUrl; diff --git a/src/Ombi.Core/Engine/V2/TvSearchEngineV2.cs b/src/Ombi.Core/Engine/V2/TvSearchEngineV2.cs index 06d2c9e87..aa8bcc9b3 100644 --- a/src/Ombi.Core/Engine/V2/TvSearchEngineV2.cs +++ b/src/Ombi.Core/Engine/V2/TvSearchEngineV2.cs @@ -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; } diff --git a/src/Ombi/ClientApp/src/app/discover/components/actor/discover-actor.component.ts b/src/Ombi/ClientApp/src/app/discover/components/actor/discover-actor.component.ts index e4c624ce7..6ea9d677c 100644 --- a/src/Ombi/ClientApp/src/app/discover/components/actor/discover-actor.component.ts +++ b/src/Ombi/ClientApp/src/app/discover/components/actor/discover-actor.component.ts @@ -54,7 +54,8 @@ export class DiscoverActorComponent implements AfterViewInit { url: null, rating: 0, overview: m.overview, - approved: false + approved: false, + imdbid: "", }); }); } diff --git a/src/Ombi/ClientApp/src/app/discover/components/card/discover-card.component.ts b/src/Ombi/ClientApp/src/app/discover/components/card/discover-card.component.ts index ac30593eb..ba7234177 100644 --- a/src/Ombi/ClientApp/src/app/discover/components/card/discover-card.component.ts +++ b/src/Ombi/ClientApp/src/app/discover/components/card/discover-card.component.ts @@ -4,8 +4,8 @@ import { RequestType, ISearchTvResult, ISearchMovieResult } from "../../../inter import { SearchV2Service } from "../../../services"; import { MatDialog } from "@angular/material"; import { DiscoverCardDetailsComponent } from "./discover-card-details.component"; -import { ISearchTvResultV2 } from "../../interfaces/ISearchTvResultV2"; -import { ISearchMovieResultV2 } from "../../interfaces/ISearchMovieResultV2"; +import { ISearchTvResultV2 } from "../../../interfaces/ISearchTvResultV2"; +import { ISearchMovieResultV2 } from "../../../interfaces/ISearchMovieResultV2"; @Component({ selector: "discover-card", @@ -43,12 +43,12 @@ export class DiscoverCardComponent implements OnInit { } private getExtraMovieInfo() { - // if(!this.result.imdbid) { + if(!this.result.imdbid) { this.searchService.getFullMovieDetails(this.result.id) .subscribe(m => { this.updateMovieItem(m); }); - // } + } } private updateMovieItem(updated: ISearchMovieResultV2) { diff --git a/src/Ombi/ClientApp/src/app/discover/components/collections/discover-collections.component.ts b/src/Ombi/ClientApp/src/app/discover/components/collections/discover-collections.component.ts index eab7b2ec3..2fdca057a 100644 --- a/src/Ombi/ClientApp/src/app/discover/components/collections/discover-collections.component.ts +++ b/src/Ombi/ClientApp/src/app/discover/components/collections/discover-collections.component.ts @@ -52,7 +52,8 @@ export class DiscoverCollectionsComponent implements OnInit { url: `http://www.imdb.com/title/${m.imdbId}/`, rating: 0, overview: m.overview, - approved: m.approved + approved: m.approved, + imdbid: m.imdbId, }); }); }