From a272779121c7724fe914128a2411c2d118c17b8b Mon Sep 17 00:00:00 2001 From: tidusjar Date: Sun, 28 Jan 2018 21:11:50 +0000 Subject: [PATCH] Fixed the issue where we were always adding emby episodes. Also fixed #1933 --- src/Ombi.Schedule/Jobs/Emby/EmbyEpisodeSync.cs | 2 +- .../app/requests/movierequests.component.ts | 16 +++++++++++++++- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/src/Ombi.Schedule/Jobs/Emby/EmbyEpisodeSync.cs b/src/Ombi.Schedule/Jobs/Emby/EmbyEpisodeSync.cs index 0e1a3dc79..749abd761 100644 --- a/src/Ombi.Schedule/Jobs/Emby/EmbyEpisodeSync.cs +++ b/src/Ombi.Schedule/Jobs/Emby/EmbyEpisodeSync.cs @@ -99,7 +99,7 @@ namespace Ombi.Schedule.Jobs.Emby continue; } - var existingEpisode = await _repo.GetByEmbyId(ep.Id); + var existingEpisode = await _repo.GetEpisodeByEmbyId(ep.Id); if (existingEpisode == null) { // add it diff --git a/src/Ombi/ClientApp/app/requests/movierequests.component.ts b/src/Ombi/ClientApp/app/requests/movierequests.component.ts index af0fd1abc..6b01db534 100644 --- a/src/Ombi/ClientApp/app/requests/movierequests.component.ts +++ b/src/Ombi/ClientApp/app/requests/movierequests.component.ts @@ -195,7 +195,7 @@ export class MovieRequestsComponent implements OnInit { private approveRequest(request: IMovieRequests) { this.requestService.approveMovie({ id: request.id }) .subscribe(x => { - + request.approved = true; if (x.result) { this.notificationService.success( `Request for ${request.title} has been approved successfully`); @@ -206,6 +206,20 @@ export class MovieRequestsComponent implements OnInit { }); } + private denyRequest(request: IMovieRequests) { + this.requestService.denyMovie({ id: request.id }) + .subscribe(x => { + request.denied = true; + if (x.result) { + this.notificationService.success( + `Request for ${request.title} has been denied successfully`); + } else { + this.notificationService.warning("Request Denied", x.message ? x.message : x.errorMessage); + request.denied = false; + } + }); + } + private loadInit() { this.requestService.getMovieRequests(this.amountToLoad, 0) .subscribe(x => {