mirror of
https://github.com/navidrome/navidrome.git
synced 2025-08-10 00:52:20 +00:00
Only start the cache warming after all folders were scanned
This commit is contained in:
@@ -122,6 +122,7 @@ func (s *scanner) RescanAll(fullRescan bool) {
|
||||
}
|
||||
|
||||
func (s *scanner) rescanAll(fullRescan bool) {
|
||||
defer s.cacheWarmer.Flush(context.Background())
|
||||
var hasError bool
|
||||
for folder := range s.folders {
|
||||
err := s.rescan(folder, fullRescan)
|
||||
|
||||
@@ -65,7 +65,6 @@ const (
|
||||
// Delete all empty albums, delete all empty artists, clean-up playlists
|
||||
func (s *TagScanner) Scan(ctx context.Context, lastModifiedSince time.Time) error {
|
||||
ctx = s.withAdminUser(ctx)
|
||||
defer s.cacheWarmer.Flush(ctx)
|
||||
|
||||
start := time.Now()
|
||||
allFSDirs, err := s.getDirTree(ctx)
|
||||
|
||||
Reference in New Issue
Block a user