mirror of
https://git.um-react.app/um/cli.git
synced 2026-10-20 21:43:02 +00:00
feat: add flags to ignore known non-music file extensions and update processor logic to support this feature
This commit is contained in:
@@ -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)
|
||||
}
|
||||
Reference in New Issue
Block a user