feat(scanner): add folder hash for smarter quick scan change detection (#4220)

* Simplify folder hash migration

* fix hashing lint

* refactor

Signed-off-by: Deluan <deluan@navidrome.org>

* Update scanner/folder_entry.go

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Signed-off-by: Deluan <deluan@navidrome.org>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
Deluan Quintão
2025-06-12 13:17:34 -04:00
committed by GitHub
parent 050aa173cc
commit 0d74d36cec
7 changed files with 559 additions and 70 deletions
+2 -2
View File
@@ -62,7 +62,7 @@ type scanJob struct {
lib model.Library
fs storage.MusicFS
cw artwork.CacheWarmer
lastUpdates map[string]time.Time
lastUpdates map[string]model.FolderUpdateInfo
lock sync.Mutex
numFolders atomic.Int64
}
@@ -91,7 +91,7 @@ func newScanJob(ctx context.Context, ds model.DataStore, cw artwork.CacheWarmer,
}, nil
}
func (j *scanJob) popLastUpdate(folderID string) time.Time {
func (j *scanJob) popLastUpdate(folderID string) model.FolderUpdateInfo {
j.lock.Lock()
defer j.lock.Unlock()