mirror of
https://github.com/navidrome/navidrome.git
synced 2026-04-28 03:19:38 +00:00
fix(scanner): always check for needed initial scan.
Relates to #4246 Signed-off-by: Deluan <deluan@navidrome.org>
This commit is contained in:
parent
f1fc2cd9b9
commit
177de7269b
1 changed files with 2 additions and 1 deletions
|
|
@ -84,8 +84,8 @@ func runNavidrome(ctx context.Context) {
|
|||
g.Go(startInsightsCollector(ctx))
|
||||
g.Go(scheduleDBOptimizer(ctx))
|
||||
g.Go(startPluginManager(ctx))
|
||||
g.Go(runInitialScan(ctx))
|
||||
if conf.Server.Scanner.Enabled {
|
||||
g.Go(runInitialScan(ctx))
|
||||
g.Go(startScanWatcher(ctx))
|
||||
g.Go(schedulePeriodicScan(ctx))
|
||||
} else {
|
||||
|
|
@ -174,6 +174,7 @@ func pidHashChanged(ds model.DataStore) (bool, error) {
|
|||
return !strings.EqualFold(pidAlbum, conf.Server.PID.Album) || !strings.EqualFold(pidTrack, conf.Server.PID.Track), nil
|
||||
}
|
||||
|
||||
// runInitialScan runs an initial scan of the music library if needed.
|
||||
func runInitialScan(ctx context.Context) func() error {
|
||||
return func() error {
|
||||
ds := CreateDataStore()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue