Detect moved folders

This commit is contained in:
Deluan
2020-07-22 00:41:22 -04:00
parent 1bee98af52
commit ba347bc0b1
2 changed files with 42 additions and 28 deletions
+6 -2
View File
@@ -14,8 +14,10 @@ import (
type (
dirMapValue struct {
modTime time.Time
hasPlaylist bool
modTime time.Time
hasImages bool
hasPlaylist bool
hasAudioFiles bool
}
dirMap = map[string]dirMapValue
)
@@ -72,7 +74,9 @@ func loadDir(ctx context.Context, dirPath string) (children []string, info dirMa
if f.ModTime().After(info.modTime) {
info.modTime = f.ModTime()
}
info.hasImages = info.hasImages || utils.IsImageFile(f.Name())
info.hasPlaylist = info.hasPlaylist || utils.IsPlaylist(f.Name())
info.hasAudioFiles = info.hasAudioFiles || utils.IsAudioFile(f.Name())
}
}
return