|
|
|
@ -33,14 +33,13 @@ export class MovieDetailsComponent {
|
|
|
|
|
public messageService: MessageService, private auth: AuthService,
|
|
|
|
|
private storage: StorageService) {
|
|
|
|
|
this.route.params.subscribe((params: any) => {
|
|
|
|
|
debugger;
|
|
|
|
|
if (typeof params.movieDbId === 'string' || params.movieDbId instanceof String) {
|
|
|
|
|
if (params.movieDbId.startsWith("tt")) {
|
|
|
|
|
this.imdbId = params.movieDbId;
|
|
|
|
|
}
|
|
|
|
|
if (typeof params.movieDbId === 'string' || params.movieDbId instanceof String) {
|
|
|
|
|
if (params.movieDbId.startsWith("tt")) {
|
|
|
|
|
this.imdbId = params.movieDbId;
|
|
|
|
|
}
|
|
|
|
|
this.theMovidDbId = params.movieDbId;
|
|
|
|
|
this.load();
|
|
|
|
|
}
|
|
|
|
|
this.theMovidDbId = params.movieDbId;
|
|
|
|
|
this.load();
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -97,22 +96,22 @@ export class MovieDetailsComponent {
|
|
|
|
|
public async deny() {
|
|
|
|
|
const dialogRef = this.dialog.open(DenyDialogComponent, {
|
|
|
|
|
width: '250px',
|
|
|
|
|
data: {requestId: this.movieRequest.id, requestType: RequestType.movie}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
dialogRef.afterClosed().subscribe(result => {
|
|
|
|
|
data: { requestId: this.movieRequest.id, requestType: RequestType.movie }
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
dialogRef.afterClosed().subscribe(result => {
|
|
|
|
|
this.movieRequest.denied = result;
|
|
|
|
|
if(this.movieRequest.denied) {
|
|
|
|
|
if (this.movieRequest.denied) {
|
|
|
|
|
this.movie.approved = false;
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public async issue() {
|
|
|
|
|
const dialogRef = this.dialog.open(NewIssueComponent, {
|
|
|
|
|
width: '500px',
|
|
|
|
|
data: {requestId: this.movieRequest ? this.movieRequest.id : null, requestType: RequestType.movie, providerId: this.movie.imdbId ? this.movie.imdbId : this.movie.id, title: this.movie.title}
|
|
|
|
|
});
|
|
|
|
|
data: { requestId: this.movieRequest ? this.movieRequest.id : null, requestType: RequestType.movie, providerId: this.movie.imdbId ? this.movie.imdbId : this.movie.id, title: this.movie.title }
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public async approve() {
|
|
|
|
@ -126,7 +125,7 @@ export class MovieDetailsComponent {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public async markAvailable() {
|
|
|
|
|
const result = await this.requestService.markMovieAvailable({id: this.movieRequest.id}).toPromise();
|
|
|
|
|
const result = await this.requestService.markMovieAvailable({ id: this.movieRequest.id }).toPromise();
|
|
|
|
|
if (result.result) {
|
|
|
|
|
this.movie.available = true;
|
|
|
|
|
this.messageService.send(result.message, "Ok");
|
|
|
|
@ -135,7 +134,13 @@ export class MovieDetailsComponent {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public setAdvancedOptions(data: any) {
|
|
|
|
|
public setAdvancedOptions(data: IAdvancedData) {
|
|
|
|
|
this.advancedOptions = data;
|
|
|
|
|
if (data.rootFolderId) {
|
|
|
|
|
this.movieRequest.qualityOverrideTitle = data.rootFolders.filter(x => x.id == data.rootFolderId)[0].path;
|
|
|
|
|
}
|
|
|
|
|
if (data.profileId) {
|
|
|
|
|
this.movieRequest.rootPathOverrideTitle = data.profiles.filter(x => x.id == data.profileId)[0].name;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|