pull/3895/head
Jamie Rees 6 years ago
commit 403e79d5d3

@ -1,9 +1,8 @@
<div class="small-middle-container">
<div class="small-middle-container" *ngIf="collection">
<div class="row justify-content-md-center top-spacing">
<h2>{{collection.title}}</h2>
<p>{{collection.overview}}</p>
<h3 class="row">{{collection.name}}</h3>
<p class="row">{{collection.overview}}</p>
</div>
<div *ngIf="loadingFlag" class="row justify-content-md-center top-spacing loading-spinner">
<mat-spinner [color]="'accent'"></mat-spinner>

@ -24,8 +24,9 @@ export class DiscoverCollectionsComponent implements OnInit {
}
public async ngOnInit() {
this.collection = await this.searchService.getMovieCollections(this.collectionId);
this.createModel();
this.loadingFlag = true;
this.collection = await this.searchService.getMovieCollections(this.collectionId);
this.createModel();
}
private createModel() {
@ -39,7 +40,7 @@ export class DiscoverCollectionsComponent implements OnInit {
type: RequestType.movie,
id: m.id,
url: `http://www.imdb.com/title/${m.imdbId}/`,
rating: null,
rating: 0,
overview: m.overview,
approved: m.approved
});

@ -43,6 +43,9 @@
<button (click)="approve()" mat-raised-button class="btn-spacing" color="accent">
<i class="fa fa-plus"></i> {{ 'Common.Approve' | translate }}
</button>
<button *ngIf="!movie.available" (click)="markAvailable()" mat-raised-button class="btn-spacing" color="accent">
<i class="fa fa-plus"></i> {{ 'Requests.MarkAvailable' | translate }}
</button>
<button *ngIf="hasRequest && !movieRequest.denied" mat-raised-button class="btn-spacing" color="warn" (click)="deny()">
<i class="fa fa-times"></i> {{

@ -109,6 +109,16 @@ export class MovieDetailsComponent {
}
}
public async markAvailable() {
const result = await this.requestService.markMovieAvailable({id: this.movieRequest.id}).toPromise();
if (result.result) {
this.movie.available = true;
this.messageService.send(result.message, "Ok");
} else {
this.messageService.send(result.errorMessage, "Ok");
}
}
private setQualityOverrides(): void {
if (this.radarrProfiles) {
const profile = this.radarrProfiles.filter((p) => {
@ -119,6 +129,7 @@ export class MovieDetailsComponent {
}
}
}
private setRootFolderOverrides(): void {
if (this.radarrRootFolders) {
const path = this.radarrRootFolders.filter((folder) => {

Loading…
Cancel
Save