mirror of
https://github.com/beetbox/beets.git
synced 2026-02-12 10:22:13 +01:00
Metadata option (#6041)
My usecase needs the `convert` to not write tags so I can write my own APEv2 tags. This PR adds a write_metadata option to disable the `convert` plugin writing metadata to the converted files.
This commit is contained in:
commit
64c94f61b7
3 changed files with 8 additions and 2 deletions
|
|
@ -122,6 +122,7 @@ class ConvertPlugin(BeetsPlugin):
|
|||
"threads": os.cpu_count(),
|
||||
"format": "mp3",
|
||||
"id3v23": "inherit",
|
||||
"write_metadata": True,
|
||||
"formats": {
|
||||
"aac": {
|
||||
"command": (
|
||||
|
|
@ -446,8 +447,9 @@ class ConvertPlugin(BeetsPlugin):
|
|||
if id3v23 == "inherit":
|
||||
id3v23 = None
|
||||
|
||||
# Write tags from the database to the converted file.
|
||||
item.try_write(path=converted, id3v23=id3v23)
|
||||
# Write tags from the database to the file if requested
|
||||
if self.config["write_metadata"].get(bool):
|
||||
item.try_write(path=converted, id3v23=id3v23)
|
||||
|
||||
if keep_new:
|
||||
# If we're keeping the transcoded file, read it again (after
|
||||
|
|
|
|||
|
|
@ -11,6 +11,8 @@ New features:
|
|||
|
||||
- :doc:`plugins/lastgenre`: Add a ``--pretend`` option to preview genre changes
|
||||
without storing or writing them.
|
||||
- :doc:`plugins/convert`: Add a config option to disable writing metadata to
|
||||
converted files.
|
||||
- :doc:`plugins/discogs`: New config option `strip_disambiguation` to toggle
|
||||
stripping discogs numeric disambiguation on artist and label fields.
|
||||
|
||||
|
|
|
|||
|
|
@ -97,6 +97,8 @@ The available options are:
|
|||
- **embed**: Embed album art in converted items. Default: ``yes``.
|
||||
- **id3v23**: Can be used to override the global ``id3v23`` option. Default:
|
||||
``inherit``.
|
||||
- **write_metadata**: Can be used to disable writing metadata to converted
|
||||
files. Default: ``true``.
|
||||
- **max_bitrate**: By default, the plugin does not transcode files that are
|
||||
already in the destination format. This option instead also transcodes files
|
||||
with high bitrates, even if they are already in the same format as the output.
|
||||
|
|
|
|||
Loading…
Reference in a new issue