refactor: return scan context from scanner

This commit is contained in:
sentriz
2022-02-18 18:36:11 +00:00
committed by Senan Kelly
parent b0d5861d10
commit 10e8d18a0f
5 changed files with 110 additions and 104 deletions

View File

@@ -82,7 +82,7 @@ func (c *Controller) ServeGetMusicFolders(r *http.Request) *spec.Response {
func (c *Controller) ServeStartScan(r *http.Request) *spec.Response {
go func() {
if err := c.Scanner.ScanAndClean(scanner.ScanOptions{}); err != nil {
if _, err := c.Scanner.ScanAndClean(scanner.ScanOptions{}); err != nil {
log.Printf("error while scanning: %v\n", err)
}
}()