fix(audiobooks): warn when skip-check errors during scan
Transient DB errors from the skip-check fell through silently to the full reconcile path. The fall-through is still correct, but operators need visibility when it happens - a 240K-folder rescan that quietly loses the fast path is a 12h elapsed_sec, not 12s.
This commit is contained in:
@@ -248,7 +248,14 @@ func (s *Scanner) ScanAudiobookFolder(ctx context.Context, folder *models.MediaF
|
||||
}
|
||||
|
||||
func (s *Scanner) reconcileAudiobookFolder(ctx context.Context, folder *models.MediaFolder, folderPath string, skipped *int64) error {
|
||||
if isUnchanged, err := s.audiobookFolderShouldSkip(ctx, folder, folderPath); err == nil && isUnchanged {
|
||||
isUnchanged, skipErr := s.audiobookFolderShouldSkip(ctx, folder, folderPath)
|
||||
if skipErr != nil {
|
||||
slog.Warn("audiobook scan: skip-check failed, falling through",
|
||||
"folder_id", folder.ID,
|
||||
"path", folderPath,
|
||||
"error", skipErr,
|
||||
)
|
||||
} else if isUnchanged {
|
||||
atomic.AddInt64(skipped, 1)
|
||||
return nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user