From ec575df36e49c86e85fd7e2de80a1a14ca2fdc44 Mon Sep 17 00:00:00 2001 From: Jamie Rees Date: Sun, 3 Jun 2018 20:00:23 +0100 Subject: [PATCH] Added the subscribe on the sarch page --- src/Ombi.Core/Engine/MovieSearchEngine.cs | 2 +- src/Ombi/ClientApp/app/search/moviesearch.component.ts | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Ombi.Core/Engine/MovieSearchEngine.cs b/src/Ombi.Core/Engine/MovieSearchEngine.cs index 39fd88f5a..fbda62023 100644 --- a/src/Ombi.Core/Engine/MovieSearchEngine.cs +++ b/src/Ombi.Core/Engine/MovieSearchEngine.cs @@ -179,7 +179,7 @@ namespace Ombi.Core.Engine // Check if this user requested it var user = await GetUser(); var request = await RequestService.MovieRequestService.GetAll() - .AnyAsync(x => x.RequestedUserId.Equals(user.Id) && x.Id == viewModel.Id); + .AnyAsync(x => x.RequestedUserId.Equals(user.Id) && x.TheMovieDbId == viewModel.Id); if (request) { viewModel.ShowSubscribe = false; diff --git a/src/Ombi/ClientApp/app/search/moviesearch.component.ts b/src/Ombi/ClientApp/app/search/moviesearch.component.ts index a89a11b84..ff570441a 100644 --- a/src/Ombi/ClientApp/app/search/moviesearch.component.ts +++ b/src/Ombi/ClientApp/app/search/moviesearch.component.ts @@ -79,6 +79,7 @@ export class MovieSearchComponent implements OnInit { public request(searchResult: ISearchMovieResult) { searchResult.requested = true; searchResult.requestProcessing = true; + searchResult.showSubscribe = false; if (this.authService.hasRole("admin") || this.authService.hasRole("AutoApproveMovie")) { searchResult.approved = true; } @@ -103,6 +104,7 @@ export class MovieSearchComponent implements OnInit { searchResult.approved = false; searchResult.processed = false; searchResult.requestProcessing = false; + } }); } catch (e) {