|
|
|
@ -1,4 +1,4 @@
|
|
|
|
|
import { Component, Inject, OnInit, ViewEncapsulation } from "@angular/core";
|
|
|
|
|
import { Component, ViewEncapsulation } from "@angular/core";
|
|
|
|
|
import { ImageService, SearchV2Service, RequestService, MessageService, RadarrService } from "../../../services";
|
|
|
|
|
import { ActivatedRoute } from "@angular/router";
|
|
|
|
|
import { DomSanitizer } from "@angular/platform-browser";
|
|
|
|
@ -9,19 +9,16 @@ import { AuthService } from "../../../auth/auth.service";
|
|
|
|
|
import { IMovieRequests, RequestType, IAdvancedData } from "../../../interfaces";
|
|
|
|
|
import { DenyDialogComponent } from "../shared/deny-dialog/deny-dialog.component";
|
|
|
|
|
import { NewIssueComponent } from "../shared/new-issue/new-issue.component";
|
|
|
|
|
import { StorageService } from "../../../shared/storage/storage-service";
|
|
|
|
|
import { MovieAdvancedOptionsComponent } from "./panels/movie-advanced-options/movie-advanced-options.component";
|
|
|
|
|
import { RequestServiceV2 } from "../../../services/requestV2.service";
|
|
|
|
|
import { RequestBehalfComponent } from "../shared/request-behalf/request-behalf.component";
|
|
|
|
|
import { IMovieRatings } from "../../../interfaces/IRatings";
|
|
|
|
|
import { APP_BASE_HREF } from "@angular/common";
|
|
|
|
|
|
|
|
|
|
@Component({
|
|
|
|
|
templateUrl: "./movie-details.component.html",
|
|
|
|
|
styleUrls: ["../../media-details.component.scss"],
|
|
|
|
|
encapsulation: ViewEncapsulation.None
|
|
|
|
|
})
|
|
|
|
|
export class MovieDetailsComponent implements OnInit {
|
|
|
|
|
export class MovieDetailsComponent {
|
|
|
|
|
public movie: ISearchMovieResultV2;
|
|
|
|
|
public hasRequest: boolean;
|
|
|
|
|
public movieRequest: IMovieRequests;
|
|
|
|
@ -36,22 +33,18 @@ export class MovieDetailsComponent implements OnInit {
|
|
|
|
|
private sanitizer: DomSanitizer, private imageService: ImageService,
|
|
|
|
|
public dialog: MatDialog, private requestService: RequestService,
|
|
|
|
|
private requestService2: RequestServiceV2, private radarrService: RadarrService,
|
|
|
|
|
public messageService: MessageService, private auth: AuthService,
|
|
|
|
|
private storage: StorageService) {
|
|
|
|
|
this.route.params.subscribe((params: any) => {
|
|
|
|
|
public messageService: MessageService, private auth: AuthService) {
|
|
|
|
|
this.route.params.subscribe(async (params: any) => {
|
|
|
|
|
if (typeof params.movieDbId === 'string' || params.movieDbId instanceof String) {
|
|
|
|
|
if (params.movieDbId.startsWith("tt")) {
|
|
|
|
|
this.imdbId = params.movieDbId;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
this.theMovidDbId = params.movieDbId;
|
|
|
|
|
await this.load();
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public async ngOnInit() {
|
|
|
|
|
await this.load();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public async load() {
|
|
|
|
|
|
|
|
|
|
this.isAdmin = this.auth.hasRole("admin") || this.auth.hasRole("poweruser");
|
|
|
|
|