Performance improvements; import speedup

This commit is contained in:
Mukhtar Akere
2025-04-03 11:24:30 +01:00
parent 7d954052ae
commit 4659cd4273
16 changed files with 273 additions and 192 deletions

View File

@@ -11,7 +11,7 @@ var (
MUSICMATCH = "(?i)(\\.)(mp2|mp3|m4a|m4b|m4p|ogg|oga|opus|wma|wav|wv|flac|ape|aif|aiff|aifc)$"
)
var SAMPLEMATCH = `(?i)(^|[\\/]|\s|[._-])(sample|trailer|thumb|special|extras?)s?(\s|[._-]|$|/)`
var SAMPLEMATCH = `(?i)(^|[\\/]|\s|[(])(?:sample|trailer|thumb|special|extras?)s?([\s._\-/)]|$)`
func RegexMatch(regex string, value string) bool {
re := regexp.MustCompile(regex)