Fixed the issue where we were always adding emby episodes. Also fixed #1933

pull/1941/head
tidusjar 7 years ago
parent 3996d9cf77
commit a272779121

@ -99,7 +99,7 @@ namespace Ombi.Schedule.Jobs.Emby
continue; continue;
} }
var existingEpisode = await _repo.GetByEmbyId(ep.Id); var existingEpisode = await _repo.GetEpisodeByEmbyId(ep.Id);
if (existingEpisode == null) if (existingEpisode == null)
{ {
// add it // add it

@ -195,7 +195,7 @@ export class MovieRequestsComponent implements OnInit {
private approveRequest(request: IMovieRequests) { private approveRequest(request: IMovieRequests) {
this.requestService.approveMovie({ id: request.id }) this.requestService.approveMovie({ id: request.id })
.subscribe(x => { .subscribe(x => {
request.approved = true;
if (x.result) { if (x.result) {
this.notificationService.success( this.notificationService.success(
`Request for ${request.title} has been approved successfully`); `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() { private loadInit() {
this.requestService.getMovieRequests(this.amountToLoad, 0) this.requestService.getMovieRequests(this.amountToLoad, 0)
.subscribe(x => { .subscribe(x => {

Loading…
Cancel
Save