From 779d4a1c859ddaa48fecdc1533dee77bea891924 Mon Sep 17 00:00:00 2001 From: Deluan Date: Mon, 2 Nov 2020 07:57:47 -0500 Subject: [PATCH] Revert "Process empty folders as changed folders" This reverts commit e07152b6955558dbbca373cd98b46c0ffa3aae5e. --- scanner/tag_scanner.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scanner/tag_scanner.go b/scanner/tag_scanner.go index 784eb43a..722161d2 100644 --- a/scanner/tag_scanner.go +++ b/scanner/tag_scanner.go @@ -185,8 +185,8 @@ func (s *TagScanner) getDBDirTree(ctx context.Context) (map[string]struct{}, err func (s *TagScanner) folderHasChanged(ctx context.Context, folder dirStats, dbDirs map[string]struct{}, lastModified time.Time) bool { _, inDB := dbDirs[folder.Path] - // If is a new folder with at least one song OR it is empty OR it was modified after lastModified - return (!inDB && (folder.AudioFilesCount > 0)) || folder.AudioFilesCount == 0 || folder.ModTime.After(lastModified) + // If is a new folder with at least one song OR it was modified after lastModified + return (!inDB && (folder.AudioFilesCount > 0)) || folder.ModTime.After(lastModified) } func (s *TagScanner) getDeletedDirs(ctx context.Context, fsDirs dirMap, dbDirs map[string]struct{}) []string {