Implemented ad-hoc scan library support.
This commit is contained in:
parent
1d54eaa862
commit
c37dba4034
2 changed files with 9 additions and 5 deletions
|
|
@ -1,5 +1,6 @@
|
|||
import { Component, OnInit } from '@angular/core';
|
||||
import { NgbModal } from '@ng-bootstrap/ng-bootstrap';
|
||||
import { ToastrService } from 'ngx-toastr';
|
||||
import { Library } from 'src/app/_models/library';
|
||||
import { LibraryService } from 'src/app/_services/library.service';
|
||||
import { DirectoryPickerComponent, DirectoryPickerResult } from '../_modals/directory-picker/directory-picker.component';
|
||||
|
|
@ -15,7 +16,7 @@ export class ManageLibraryComponent implements OnInit {
|
|||
libraries: Library[] = [];
|
||||
createLibraryToggle = false;
|
||||
|
||||
constructor(private modalService: NgbModal, private libraryService: LibraryService) { }
|
||||
constructor(private modalService: NgbModal, private libraryService: LibraryService, private toastr: ToastrService) { }
|
||||
|
||||
ngOnInit(): void {
|
||||
|
||||
|
|
@ -57,4 +58,10 @@ export class ManageLibraryComponent implements OnInit {
|
|||
}
|
||||
}
|
||||
|
||||
scanLibrary(library: Library) {
|
||||
this.libraryService.scan(library.id).subscribe(() => {
|
||||
this.toastr.success('A scan has been queued for ' + library.name);
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue