Skip to content

Commit

Permalink
Fix harmless error message in logs when ScanSchedule set was "0"
Browse files Browse the repository at this point in the history
Message:
`ERRO[0000] Error scheduling periodic scan                error="expected exactly 5 fields, found 1: [0]"`
  • Loading branch information
deluan committed Sep 26, 2021
1 parent 5680e53 commit 6752e0a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ func runNavidrome() {
if schedule != "" {
go schedulePeriodicScan(schedule)
} else {
log.Warn("Periodic scan is DISABLED", "schedule", schedule)
log.Warn("Periodic scan is DISABLED")
}

if err := g.Run(); err != nil {
Expand Down
1 change: 1 addition & 0 deletions conf/configuration.go
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,7 @@ func validateScanSchedule() error {
}
}
if Server.ScanSchedule == "0" || Server.ScanSchedule == "" {
Server.ScanSchedule = ""
return nil
}
if _, err := time.ParseDuration(Server.ScanSchedule); err == nil {
Expand Down

0 comments on commit 6752e0a

Please sign in to comment.