mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-08-19 21:03:17 -07:00
Added back in the ability to mark movies as unavailable
This commit is contained in:
parent
bd857c1e4f
commit
5db455e899
4 changed files with 24 additions and 1 deletions
|
@ -82,6 +82,11 @@
|
|||
<i class="fas fa-plus"></i> {{ 'Requests.MarkAvailable' | translate }}
|
||||
</button>
|
||||
|
||||
<button id="markUnavailableBtn" *ngIf="movie.available" (click)="markUnavailable()" mat-raised-button class="btn-spacing"
|
||||
color="accent">
|
||||
<i class="fas fa-minus"></i> {{ 'Requests.MarkUnavailable' | translate }}
|
||||
</button>
|
||||
|
||||
<button id="denyBtn" *ngIf="movieRequest && !movieRequest.denied" mat-raised-button class="btn-spacing" color="warn" (click)="deny()">
|
||||
<i class="fas fa-times"></i> {{'Requests.Deny' | translate }}
|
||||
</button>
|
||||
|
|
|
@ -168,6 +168,17 @@ export class MovieDetailsComponent {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
public async markUnavailable() {
|
||||
const result = await this.requestService.markMovieUnavailable({ id: this.movieRequest.id }).toPromise();
|
||||
if (result.result) {
|
||||
this.movie.available = false;
|
||||
this.messageService.send(result.message, "Ok");
|
||||
} else {
|
||||
this.messageService.send(result.errorMessage, "Ok");
|
||||
}
|
||||
}
|
||||
|
||||
public setAdvancedOptions(data: IAdvancedData) {
|
||||
this.advancedOptions = data;
|
||||
if (data.rootFolderId) {
|
||||
|
|
|
@ -9,7 +9,8 @@
|
|||
<div class="row">
|
||||
<div
|
||||
class="mobile-top-text">
|
||||
<h1 id="mediaTitle" class="large-text">{{title}} <span *ngIf="releaseDate" class="grey-text">
|
||||
<h1 id="mediaTitle" class="large-text">{{title}}
|
||||
<span *ngIf="releaseDateFormat" class="grey-text">
|
||||
({{releaseDate | amLocal | amDateFormat: 'YYYY'}})</span>
|
||||
</h1>
|
||||
|
||||
|
|
|
@ -13,6 +13,12 @@ export class TopBannerComponent {
|
|||
@Input() available: boolean;
|
||||
@Input() background: any;
|
||||
|
||||
get releaseDateFormat(): Date|null {
|
||||
if (this.releaseDate && this.releaseDate instanceof Date && this.releaseDate.getFullYear() !== 1) {
|
||||
return this.releaseDate;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
constructor(private sanitizer:DomSanitizer){ }
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue