Don't cancel Scan on context cancellation

This commit is contained in:
Deluan 2023-12-14 22:52:48 -05:00 committed by Joe Stump
parent 1423b44600
commit b60ac35e4f
No known key found for this signature in database
GPG Key ID: 29151C3EC48A0EB9

View File

@ -140,6 +140,7 @@ func (s *scanner) startProgressTracker(mediaFolder string) (chan uint32, context
}
func (s *scanner) RescanAll(ctx context.Context, fullRescan bool) error {
ctx = context.WithoutCancel(ctx)
if !isScanning.TryLock() {
log.Debug("Scanner already running, ignoring request for rescan.")
return ErrAlreadyScanning