feat: add flags to ignore known non-music file extensions and update processor logic to support this feature

This commit is contained in:
鲁树人
2026-10-19 23:43:47 +09:00
parent 06e97975d8
commit ca8c4aa078
3 changed files with 49 additions and 12 deletions
+21
View File
@@ -0,0 +1,21 @@
package main
import (
"path/filepath"
"slices"
"strings"
)
// knownNonMusicExts are common non-audio suffixes to skip when walking dirs.
var knownNonMusicExts = []string{
"",
".txt",
".mmkv",
".exe",
".dll",
}
func isKnownNonMusicExt(path string) bool {
ext := strings.ToLower(filepath.Ext(path))
return slices.Contains(knownNonMusicExts, ext)
}