Add exclude file configuration instructions and examples

bnkai 2019-12-17 18:00:12 +02:00
parent 256883bbb5
commit 557bdaa297
1 changed files with 32 additions and 0 deletions

@ -0,0 +1,32 @@
As of commit 0714cbf basic exclude file from scan feature is supported in the dev build.
Given a valid [regex](https://github.com/google/re2/wiki/Syntax), files that match even partially are excluded during the Scan process and are not entered in the database.
Prior to matching both the filenames and patterns are converted to lower case so the match is case insensitive.
Regex patterns can be added in the config file or from the UI.
If you add manually to the config file a restart is needed while from the UI you just need to click the Save button.
When added through the config file directly special care must be given to double escape the `\` character.
Some examples
For the config file you need the following added
```
exclude:
- "sample\\.mp4$"
- "/\\.[[:word:]]+/"
- "c:\\\\stash\\\\videos\\\\exclude"
- "^/stash/videos/exclude/"
- "^\\\\\\\\stash\\network\\\\share\\\\excl\\\\"
```
* the first excludes all files ending in `sample.mp4` ( `.` needs to be escaped also)
* the second hidden directories `/.directoryname/`
* the third is an example for a windows directory `c:\stash\videos\exclude`
* the fourth the directory `/stash/videos/exclude/`
* and the last a windows network path `\\stash\network\share\excl\`
and thats how it looks if you use UI (notice the difference for the `\` character)
![regexUI](https://i.imgur.com/3Oqvuja.png)
_a useful [link](https://regex101.com/) to experiment with regexps_