🎧 Your Personal Streaming Service
Go airsonicmadsonicmedia-servermusicmusic-servernavidromeopensubsonicraspberry-piself-hostedstreamerstreaming-apistreaming-audiosubsonicsubsonic-server
fix(scanner): prevent ScanOnStartup when scanner is disabled
Deluan1cf3fd91618c
diff --git a/cmd/root.go b/cmd/root.goindex 74a15abc1..ff9a574ee 100644--- a/cmd/root.go+++ b/cmd/root.go@@ -196,7 +196,8 @@ func runInitialScan(ctx context.Context) func() error {if err != nil {return err}- scanNeeded := conf.Server.Scanner.ScanOnStartup || inProgress || fullScanRequired == "1" || pidHasChanged+ scanOnStartup := conf.Server.Scanner.Enabled && conf.Server.Scanner.ScanOnStartup+ scanNeeded := scanOnStartup || inProgress || fullScanRequired == "1" || pidHasChangedtime.Sleep(2 * time.Second) // Wait 2 seconds before the initial scanif scanNeeded {s := CreateScanner(ctx)