mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-08-19 04:49:33 -07:00
Fixed up the advanced options on the movie details page, we now load it in correctly and display them in the correct order
This commit is contained in:
parent
ff7862f599
commit
c87cfbc58f
3 changed files with 32 additions and 5 deletions
|
@ -206,4 +206,4 @@
|
||||||
<div class="bottom-page-gap">
|
<div class="bottom-page-gap">
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
</div>
|
</div>
|
|
@ -1,4 +1,4 @@
|
||||||
import { Component, ViewEncapsulation } from "@angular/core";
|
import { AfterViewInit, Component, ViewChild, ViewEncapsulation } from "@angular/core";
|
||||||
import { ImageService, SearchV2Service, RequestService, MessageService, RadarrService } from "../../../services";
|
import { ImageService, SearchV2Service, RequestService, MessageService, RadarrService } from "../../../services";
|
||||||
import { ActivatedRoute } from "@angular/router";
|
import { ActivatedRoute } from "@angular/router";
|
||||||
import { DomSanitizer } from "@angular/platform-browser";
|
import { DomSanitizer } from "@angular/platform-browser";
|
||||||
|
@ -12,6 +12,7 @@ import { NewIssueComponent } from "../shared/new-issue/new-issue.component";
|
||||||
import { MovieAdvancedOptionsComponent } from "./panels/movie-advanced-options/movie-advanced-options.component";
|
import { MovieAdvancedOptionsComponent } from "./panels/movie-advanced-options/movie-advanced-options.component";
|
||||||
import { RequestServiceV2 } from "../../../services/requestV2.service";
|
import { RequestServiceV2 } from "../../../services/requestV2.service";
|
||||||
import { RequestBehalfComponent } from "../shared/request-behalf/request-behalf.component";
|
import { RequestBehalfComponent } from "../shared/request-behalf/request-behalf.component";
|
||||||
|
import { Observable, forkJoin } from "rxjs";
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
templateUrl: "./movie-details.component.html",
|
templateUrl: "./movie-details.component.html",
|
||||||
|
@ -70,6 +71,7 @@ export class MovieDetailsComponent {
|
||||||
// Load up this request
|
// Load up this request
|
||||||
this.hasRequest = true;
|
this.hasRequest = true;
|
||||||
this.movieRequest = await this.requestService.getMovieRequest(this.movie.requestId);
|
this.movieRequest = await this.requestService.getMovieRequest(this.movie.requestId);
|
||||||
|
this.loadAdvancedInfo();
|
||||||
}
|
}
|
||||||
this.loadBanner();
|
this.loadBanner();
|
||||||
});
|
});
|
||||||
|
@ -138,10 +140,10 @@ export class MovieDetailsComponent {
|
||||||
public setAdvancedOptions(data: IAdvancedData) {
|
public setAdvancedOptions(data: IAdvancedData) {
|
||||||
this.advancedOptions = data;
|
this.advancedOptions = data;
|
||||||
if (data.rootFolderId) {
|
if (data.rootFolderId) {
|
||||||
this.movieRequest.qualityOverrideTitle = data.rootFolders.filter(x => x.id == data.rootFolderId)[0].path;
|
this.movieRequest.qualityOverrideTitle = data.profiles.filter(x => x.id == data.profileId)[0].name;
|
||||||
}
|
}
|
||||||
if (data.profileId) {
|
if (data.profileId) {
|
||||||
this.movieRequest.rootPathOverrideTitle = data.profiles.filter(x => x.id == data.profileId)[0].name;
|
this.movieRequest.rootPathOverrideTitle = data.rootFolders.filter(x => x.id == data.rootFolderId)[0].path;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -177,4 +179,30 @@ export class MovieDetailsComponent {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private loadAdvancedInfo() {
|
||||||
|
const profile = this.radarrService.getQualityProfilesFromSettings();
|
||||||
|
const folders = this.radarrService.getRootFoldersFromSettings();
|
||||||
|
|
||||||
|
forkJoin([profile, folders]).subscribe(x => {
|
||||||
|
debugger;
|
||||||
|
const radarrProfiles = x[0];
|
||||||
|
const radarrRootFolders = x[1];
|
||||||
|
|
||||||
|
const profile = radarrProfiles.filter((p) => {
|
||||||
|
return p.id === this.movieRequest.qualityOverride;
|
||||||
|
});
|
||||||
|
if (profile.length > 0) {
|
||||||
|
this.movieRequest.qualityOverrideTitle = profile[0].name;
|
||||||
|
}
|
||||||
|
|
||||||
|
const path = radarrRootFolders.filter((folder) => {
|
||||||
|
return folder.id === this.movieRequest.rootPathOverride;
|
||||||
|
});
|
||||||
|
if (path.length > 0) {
|
||||||
|
this.movieRequest.rootPathOverrideTitle = path[0].path;
|
||||||
|
}
|
||||||
|
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
<div class="wizard-background">
|
<div class="wizard-background">
|
||||||
<div class="container wizard-inner">
|
<div class="container wizard-inner">
|
||||||
|
|
||||||
<mat-horizontal-stepper linear #stepper>
|
<mat-horizontal-stepper linear #stepper>
|
||||||
<mat-step >
|
<mat-step >
|
||||||
<form >
|
<form >
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue