zero plugin allows you to null fields in files’ metadata tags. Fields
can be nulled unconditionally or conditioned on a pattern match. For example,
the plugin can strip useless comments like “ripped by MyGreatRipper.”
The plugin can work in one of two modes. The first mode, the default, is a blacklist, where you choose the tags you want to remove. The second mode is a whitelist, where you instead specify the tags you want to keep.
To use the
zero plugin, enable the plugin in your configuration
(see Using Plugins).
zero: section in your configuration file. You can specify the
fields to nullify and the conditions for nullifying them:
yesto null fields automatically on import. Default:
fieldsto a whitespace-separated list of fields to change. You can get the list of all available fields by running
beet fields. In addition, the
imagesfield allows you to remove any images embedded in the media file.
keep_fieldsto invert the logic of the plugin. Only these fields will be kept; other fields will be removed. Remember to set only
- To conditionally filter a field, use
field: [regexp, regexp]to specify regular expressions.
- By default this plugin only affects files’ tags ; the beets database is left
unchanged. To update the tags in the database, set the
zero: fields: month day genre comments comments: [EAC, LAME, from.+collection, 'ripped by'] genre: [rnb, 'power metal'] update_database: true
If a custom pattern is not defined for a given field, the field will be nulled unconditionally.
Note that the plugin currently does not zero fields when importing “as-is”.
Manually Triggering Zero¶
You can also type
beet zero [QUERY] to manually invoke the plugin on music
in your library.
Preserving Album Art¶
If you use the
keep_fields option, the plugin will remove embedded album
art from files’ tags unless you tell it not to. To keep the album art, include
the special field
images in the list. For example:
zero: keep_fields: title artist album year track genre images