Improve has_episodes regex

This commit is contained in:
Ben Sarmiento
2023-12-12 04:33:58 +01:00
parent 1ae800d77a
commit 1661857194

View File

@@ -216,7 +216,10 @@ func (z *ZurgConfigV1) matchFilter(torrentName string, torrentSize int64, torren
return false return false
} }
if filter.HasEpisodes { if filter.HasEpisodes {
regex := regexp.MustCompile(`(?i)s\d\de\d\d`) regex := regexp.MustCompile(`(?i)s\d{2,3}.?e\d{2,3}`)
if regex.MatchString(torrentName) {
return true
}
for _, filename := range fileNames { for _, filename := range fileNames {
if regex.MatchString(filename) { if regex.MatchString(filename) {
return true return true