mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-08-19 12:59:39 -07:00
Remove dead code
This commit is contained in:
parent
551da1a0aa
commit
6756ee688a
1 changed files with 0 additions and 64 deletions
|
@ -80,70 +80,6 @@ export class TvRequestGridComponent {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public async approve(request: IChildRequests) {
|
|
||||||
const result = await this.requestService.approveChild({
|
|
||||||
id: request.id
|
|
||||||
}).toPromise();
|
|
||||||
|
|
||||||
if (result.result) {
|
|
||||||
request.approved = true;
|
|
||||||
request.denied = false;
|
|
||||||
request.seasonRequests.forEach((season) => {
|
|
||||||
season.episodes.forEach((ep) => {
|
|
||||||
ep.approved = true;
|
|
||||||
});
|
|
||||||
});
|
|
||||||
this.notificationService.send("Request has been approved", "Ok");
|
|
||||||
} else {
|
|
||||||
this.notificationService.send(result.errorMessage, "Ok");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public changeAvailability(request: IChildRequests, available: boolean) {
|
|
||||||
request.available = available;
|
|
||||||
request.seasonRequests.forEach((season) => {
|
|
||||||
season.episodes.forEach((ep) => {
|
|
||||||
ep.available = available;
|
|
||||||
});
|
|
||||||
});
|
|
||||||
if (available) {
|
|
||||||
this.requestService.markTvAvailable({ id: request.id }).subscribe(x => {
|
|
||||||
if (x.result) {
|
|
||||||
this.notificationService.send(
|
|
||||||
`This request is now available`);
|
|
||||||
} else {
|
|
||||||
this.notificationService.send("Request Available", x.message ? x.message : x.errorMessage);
|
|
||||||
request.approved = false;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
this.requestService.markTvUnavailable({ id: request.id }).subscribe(x => {
|
|
||||||
if (x.result) {
|
|
||||||
this.notificationService.send(
|
|
||||||
`This request is now unavailable`);
|
|
||||||
} else {
|
|
||||||
this.notificationService.send("Request Available", x.message ? x.message : x.errorMessage);
|
|
||||||
request.approved = false;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
public async deny(request: IChildRequests) {
|
|
||||||
const dialogRef = this.dialog.open(DenyDialogComponent, {
|
|
||||||
width: '250px',
|
|
||||||
data: {requestId: request.id, requestType: RequestType.tvShow}
|
|
||||||
});
|
|
||||||
|
|
||||||
dialogRef.afterClosed().subscribe(result => {
|
|
||||||
request.denied = true;
|
|
||||||
request.seasonRequests.forEach((season) => {
|
|
||||||
season.episodes.forEach((ep) => {
|
|
||||||
ep.approved = false;
|
|
||||||
});
|
|
||||||
});
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
public async requestAllSeasons() {
|
public async requestAllSeasons() {
|
||||||
this.tv.requestAll = true;
|
this.tv.requestAll = true;
|
||||||
await this.submitRequests();
|
await this.submitRequests();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue