Page 1 of 1

Custom preset not filtering featurettes

Posted: 25 Feb 2025, 07:53
by numberone
I found info about using presets for filtering out paths based on a match here:
viewtopic.php?p=34979

However, this is not working for me where I have a source folder structure like:

Format: Select all

Series Name
--Featurettes
----Season 1
------video1.mkv
----Season 2
------video2.mkv
--Season 1
------s01e01.mkv
--Season 2
------s02e01.mkv
My "includes" string is:

Format: Select all

!(f =~ /behindthescenes|featurettes/)
Lots of files under the Featurettes folder and subfolders are still being matched. I was under the impression that an exclude match based on the file path would exclude any file with the word "featurettes" in any part of the path.

Re: Custom preset not filtering featurettes

Posted: 25 Feb 2025, 08:20
by rednoah
/behindthescenes|featurettes/ is a case-sensitive regex that matches featurettes but not Featurettes.


:arrow: You can do what you want like so:

Groovy: Select all

!(f =~ /(?i:behindthescenes|featurettes)/)

:arrow: String.match() forces the (?i) flag by default:

Groovy: Select all

none{ f.path.match(/behindthescenes|featurettes/ }

Re: Custom preset not filtering featurettes

Posted: 25 Feb 2025, 17:07
by numberone
Ah, thanks. I got confused because my episode format expression appears to be case insensitive without any flag. I'm guessing this is because I must be using String.match variants there.