🎧 Your Personal Streaming Service
Go airsonicmadsonicmedia-servermusicmusic-servernavidromeopensubsonicraspberry-piself-hostedstreamerstreaming-apistreaming-audiosubsonicsubsonic-server
fix(scanner): reset watcher trigger timer for debounce on notification receipt
Deluanc873466e5b33
diff --git a/scanner/watcher.go b/scanner/watcher.goindex ad9a06421..3efebaacc 100644--- a/scanner/watcher.go+++ b/scanner/watcher.go@@ -122,6 +122,9 @@ func (w *watcher) Run(ctx context.Context) error {w.mu.Unlock()return nilcase notification := <-w.watcherNotify:+ // Reset the trigger timer for debounce+ trigger.Reset(w.triggerWait)+lib := notification.LibraryfolderPath := notification.FolderPath@@ -131,7 +134,6 @@ func (w *watcher) Run(ctx context.Context) error {continue}targets[target] = struct{}{}- trigger.Reset(w.triggerWait)log.Debug(ctx, "Watcher: Detected changes. Waiting for more changes before triggering scan","libraryID", lib.ID, "name", lib.Name, "path", lib.Path, "folderPath", folderPath)