mirror of
https://github.com/navidrome/navidrome.git
synced 2025-04-04 21:17:37 +03:00
Only start the cache warming after all folders were scanned
This commit is contained in:
parent
d9f7a154cf
commit
464e251d19
2 changed files with 1 additions and 1 deletions
|
@ -122,6 +122,7 @@ func (s *scanner) RescanAll(fullRescan bool) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *scanner) rescanAll(fullRescan bool) {
|
func (s *scanner) rescanAll(fullRescan bool) {
|
||||||
|
defer s.cacheWarmer.Flush(context.Background())
|
||||||
var hasError bool
|
var hasError bool
|
||||||
for folder := range s.folders {
|
for folder := range s.folders {
|
||||||
err := s.rescan(folder, fullRescan)
|
err := s.rescan(folder, fullRescan)
|
||||||
|
|
|
@ -65,7 +65,6 @@ const (
|
||||||
// Delete all empty albums, delete all empty artists, clean-up playlists
|
// Delete all empty albums, delete all empty artists, clean-up playlists
|
||||||
func (s *TagScanner) Scan(ctx context.Context, lastModifiedSince time.Time) error {
|
func (s *TagScanner) Scan(ctx context.Context, lastModifiedSince time.Time) error {
|
||||||
ctx = s.withAdminUser(ctx)
|
ctx = s.withAdminUser(ctx)
|
||||||
defer s.cacheWarmer.Flush(ctx)
|
|
||||||
|
|
||||||
start := time.Now()
|
start := time.Now()
|
||||||
allFSDirs, err := s.getDirTree(ctx)
|
allFSDirs, err := s.getDirTree(ctx)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue