mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-07-12 00:06:05 -07:00
#1513 !wip when we request episodes then it will show as pending approval if the request was successful
This commit is contained in:
parent
d0a7ef9223
commit
6e7e1e4660
2 changed files with 11 additions and 3 deletions
|
@ -1,4 +1,4 @@
|
|||
import { ISeasonRequests } from "./IRequestModel";
|
||||
import { INewSeasonRequests } from "./IRequestModel";
|
||||
|
||||
export interface ISearchTvResult {
|
||||
id: number;
|
||||
|
@ -21,7 +21,7 @@ export interface ISearchTvResult {
|
|||
siteRating: number;
|
||||
trailer: string;
|
||||
homepage: string;
|
||||
seasonsRequests: ISeasonRequests[];
|
||||
seasonRequests: INewSeasonRequests[];
|
||||
requestAll: boolean;
|
||||
approved: boolean;
|
||||
requested: boolean;
|
||||
|
|
|
@ -42,12 +42,20 @@ export class SeriesInformationComponent implements OnInit, OnDestroy {
|
|||
this.requestService.requestTv(this.series)
|
||||
.takeUntil(this.subscriptions)
|
||||
.subscribe(x => {
|
||||
debugger;
|
||||
this.result = x as IRequestEngineResult;
|
||||
if (this.result.requestAdded) {
|
||||
this.notificationService.success("Request Added",
|
||||
`Request for ${this.series.title} has been added successfully`);
|
||||
|
||||
this.series.seasonRequests.forEach((season) => {
|
||||
season.episodes.forEach((ep) => {
|
||||
ep.selected = false;
|
||||
});
|
||||
});
|
||||
|
||||
} else {
|
||||
this.notificationService.warning("Request Added", this.result.message);
|
||||
this.notificationService.warning("Request Added", this.result.errorMessage ? this.result.errorMessage : this.result.message);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue