mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-07-13 08:42:57 -07:00
Added the subscribe on the sarch page
This commit is contained in:
parent
a82b011ae3
commit
ec575df36e
2 changed files with 3 additions and 1 deletions
|
@ -179,7 +179,7 @@ namespace Ombi.Core.Engine
|
||||||
// Check if this user requested it
|
// Check if this user requested it
|
||||||
var user = await GetUser();
|
var user = await GetUser();
|
||||||
var request = await RequestService.MovieRequestService.GetAll()
|
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)
|
if (request)
|
||||||
{
|
{
|
||||||
viewModel.ShowSubscribe = false;
|
viewModel.ShowSubscribe = false;
|
||||||
|
|
|
@ -79,6 +79,7 @@ export class MovieSearchComponent implements OnInit {
|
||||||
public request(searchResult: ISearchMovieResult) {
|
public request(searchResult: ISearchMovieResult) {
|
||||||
searchResult.requested = true;
|
searchResult.requested = true;
|
||||||
searchResult.requestProcessing = true;
|
searchResult.requestProcessing = true;
|
||||||
|
searchResult.showSubscribe = false;
|
||||||
if (this.authService.hasRole("admin") || this.authService.hasRole("AutoApproveMovie")) {
|
if (this.authService.hasRole("admin") || this.authService.hasRole("AutoApproveMovie")) {
|
||||||
searchResult.approved = true;
|
searchResult.approved = true;
|
||||||
}
|
}
|
||||||
|
@ -103,6 +104,7 @@ export class MovieSearchComponent implements OnInit {
|
||||||
searchResult.approved = false;
|
searchResult.approved = false;
|
||||||
searchResult.processed = false;
|
searchResult.processed = false;
|
||||||
searchResult.requestProcessing = false;
|
searchResult.requestProcessing = false;
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue