fix(plex): 🐛 Fixed the issue where you couldn't add a new server on a fresh setup after the settings page rework

pull/4810/head
tidusjar 2 years ago
parent 41f0b61518
commit 187b18d5c0

@ -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…
Cancel
Save