mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-08-20 21:33:15 -07:00
fix(plex): 🐛 Fixed the issue where you couldn't add a new server on a fresh setup after the settings page rework
This commit is contained in:
parent
41f0b61518
commit
187b18d5c0
2 changed files with 7 additions and 1 deletions
|
@ -17,7 +17,6 @@ import { PlexServerDialogData } from "../models";
|
|||
})
|
||||
export class PlexServerDialogComponent {
|
||||
|
||||
|
||||
public password: string;
|
||||
public username: string;
|
||||
|
||||
|
|
|
@ -36,6 +36,10 @@ export class PlexComponent implements OnInit, OnDestroy {
|
|||
public ngOnInit() {
|
||||
this.settingsService.getPlex().subscribe(x => {
|
||||
this.settings = x;
|
||||
|
||||
if (!this.settings.servers) {
|
||||
this.settings.servers = [];
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -154,6 +158,9 @@ export class PlexComponent implements OnInit, OnDestroy {
|
|||
panelClass: "modal-panel",
|
||||
});
|
||||
dialog.afterClosed().subscribe((x) => {
|
||||
if (x.closed) {
|
||||
return;
|
||||
}
|
||||
if (x.server) {
|
||||
this.settings.servers.push(x.server);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue