diff --git a/Lists.md b/Lists.md index fdf8615..4243e1d 100644 --- a/Lists.md +++ b/Lists.md @@ -88,6 +88,30 @@ Delete the line from `whitelist` and commit. The next sync will re-add the entry to the blacklist if upstream still has it. If upstream no longer has the entry, the entry stays gone (which is probably what you want). +## Pattern syntax + +Each line in `blacklist` and `whitelist` is a pattern. The forms supported +are the same forms that qBittorrent's excluded file names accepts, since +that is where blacklist patterns ultimately end up via Cleanuparr's +Blocklist Sync: + +| Form | Example | Matches | +|---|---|---| +| `*example` | `*.srt` | File name ends with `example` | +| `example*` | `sample*` | File name starts with `example` | +| `*example*` | `*sample*` | File name contains `example` | +| `example` | `RARBG.txt` | File name is exactly `example` | +| `regex:` | `regex:.*\.srt$` | File name matches the regex | + +Cleanuparr's Malware Blocker accepts the same forms when reading the +whitelist for Sonarr/Radarr queue inspection, so a single set of pattern +forms covers both consumers. + +The forms are not interchangeable from the merge script's point of view. +`*.srt` and `regex:.*\.srt$` describe the same set of files but are +different strings. The whitelist subtraction (next section) is exact-string, +so picking one form and using it consistently in both files matters. + ## Pattern matching The whitelist-to-blacklist exclusion uses **exact-string set subtraction**,