add scan interval

This commit is contained in:
sentriz
2019-11-24 01:32:17 +00:00
parent 1bfeb117dc
commit a92074ecb4
6 changed files with 53 additions and 25 deletions

View File

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

Binary file not shown.