diff --git a/UI/Web/src/app/sidenav/_components/side-nav/side-nav.component.html b/UI/Web/src/app/sidenav/_components/side-nav/side-nav.component.html
index 5b68642d8..a20571b91 100644
--- a/UI/Web/src/app/sidenav/_components/side-nav/side-nav.component.html
+++ b/UI/Web/src/app/sidenav/_components/side-nav/side-nav.component.html
@@ -43,8 +43,7 @@
[imageUrl]="getLibraryImage(navStream.library!)" [title]="navStream.library!.name"
[comparisonMethod]="'startsWith'">
-
+
}
diff --git a/UI/Web/src/app/sidenav/_components/side-nav/side-nav.component.ts b/UI/Web/src/app/sidenav/_components/side-nav/side-nav.component.ts
index 9ac7df15c..547da378e 100644
--- a/UI/Web/src/app/sidenav/_components/side-nav/side-nav.component.ts
+++ b/UI/Web/src/app/sidenav/_components/side-nav/side-nav.component.ts
@@ -155,24 +155,25 @@ export class SideNavComponent implements OnInit {
}
async handleAction(action: ActionItem, library: Library) {
+ const lib = library;
switch (action.action) {
case(Action.Scan):
- await this.actionService.scanLibrary(library);
+ await this.actionService.scanLibrary(lib);
break;
case(Action.RefreshMetadata):
- await this.actionService.refreshLibraryMetadata(library);
+ await this.actionService.refreshLibraryMetadata(lib);
break;
case(Action.GenerateColorScape):
- await this.actionService.refreshLibraryMetadata(library, undefined, false);
+ await this.actionService.refreshLibraryMetadata(lib, undefined, false);
break;
case (Action.AnalyzeFiles):
- await this.actionService.analyzeFiles(library);
+ await this.actionService.analyzeFiles(lib);
break;
case (Action.Delete):
- await this.actionService.deleteLibrary(library);
+ await this.actionService.deleteLibrary(lib);
break;
case (Action.Edit):
- this.actionService.editLibrary(library, () => window.scrollTo(0, 0));
+ this.actionService.editLibrary(lib, () => window.scrollTo(0, 0));
break;
default:
break;
@@ -191,6 +192,7 @@ export class SideNavComponent implements OnInit {
performAction(action: ActionItem, library: Library) {
if (typeof action.callback === 'function') {
+ console.log('library: ', library)
action.callback(action, library);
}
}
diff --git a/UI/Web/src/app/sidenav/_modals/library-settings-modal/library-settings-modal.component.ts b/UI/Web/src/app/sidenav/_modals/library-settings-modal/library-settings-modal.component.ts
index ab8d46753..2333dee25 100644
--- a/UI/Web/src/app/sidenav/_modals/library-settings-modal/library-settings-modal.component.ts
+++ b/UI/Web/src/app/sidenav/_modals/library-settings-modal/library-settings-modal.component.ts
@@ -257,12 +257,12 @@ export class LibrarySettingsModalComponent implements OnInit {
// TODO: Refactor into FormArray
for(let fileTypeGroup of allFileTypeGroup) {
- this.libraryForm.addControl(fileTypeGroup + '', new FormControl(this.library.libraryFileTypes.includes(fileTypeGroup), []));
+ this.libraryForm.addControl(fileTypeGroup + '', new FormControl((this.library.libraryFileTypes || []).includes(fileTypeGroup), []));
}
// TODO: Refactor into FormArray
for(let glob of this.library.excludePatterns) {
- this.libraryForm.addControl('excludeGlob-' , new FormControl(glob, []));
+ this.libraryForm.addControl('excludeGlob-', new FormControl(glob, []));
}
this.excludePatterns = this.library.excludePatterns;