|
|
@ -42,12 +42,20 @@ export class SeriesInformationComponent implements OnInit, OnDestroy {
|
|
|
|
this.requestService.requestTv(this.series)
|
|
|
|
this.requestService.requestTv(this.series)
|
|
|
|
.takeUntil(this.subscriptions)
|
|
|
|
.takeUntil(this.subscriptions)
|
|
|
|
.subscribe(x => {
|
|
|
|
.subscribe(x => {
|
|
|
|
|
|
|
|
debugger;
|
|
|
|
this.result = x as IRequestEngineResult;
|
|
|
|
this.result = x as IRequestEngineResult;
|
|
|
|
if (this.result.requestAdded) {
|
|
|
|
if (this.result.requestAdded) {
|
|
|
|
this.notificationService.success("Request Added",
|
|
|
|
this.notificationService.success("Request Added",
|
|
|
|
`Request for ${this.series.title} has been added successfully`);
|
|
|
|
`Request for ${this.series.title} has been added successfully`);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.series.seasonRequests.forEach((season) => {
|
|
|
|
|
|
|
|
season.episodes.forEach((ep) => {
|
|
|
|
|
|
|
|
ep.selected = false;
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
this.notificationService.warning("Request Added", this.result.message);
|
|
|
|
this.notificationService.warning("Request Added", this.result.errorMessage ? this.result.errorMessage : this.result.message);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|