File: filefilter.rst

package info (click to toggle)
beets 2.2.0-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 8,536 kB
  • sloc: python: 45,608; javascript: 7,997; xml: 334; sh: 261; makefile: 119
file content (30 lines) | stat: -rw-r--r-- 1,049 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
FileFilter Plugin
=================

The ``filefilter`` plugin allows you to skip files during import using
regular expressions.

To use the ``filefilter`` plugin, enable it in your configuration (see
:ref:`using-plugins`).

Configuration
-------------

To configure the plugin, make a ``filefilter:`` section in your
configuration file. The available options are:

- **path**: A regular expression to filter files based on their path and name.
  Default: ``.*`` (import everything)
- **album_path** and **singleton_path**: You may specify different regular
  expressions used for imports of albums and singletons. This way, you can
  automatically skip singletons when importing albums if the names (and paths)
  of the files are distinguishable via a regex. The regexes defined here
  take precedence over the global ``path`` option.

Here's an example::

    filefilter:
        path: .*\d\d[^/]+$
              # will only import files which names start with two digits
        album_path: .*\d\d[^/]+$
        singleton_path: .*/(?!\d\d)[^/]+$