diff --git a/beetsplug/convert.py b/beetsplug/convert.py index 102976dd7..e72f8c75a 100644 --- a/beetsplug/convert.py +++ b/beetsplug/convert.py @@ -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 diff --git a/docs/changelog.rst b/docs/changelog.rst index 6c81a0d08..092a1a5a0 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -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. diff --git a/docs/plugins/convert.rst b/docs/plugins/convert.rst index 8917422c5..ecf60a85b 100644 --- a/docs/plugins/convert.rst +++ b/docs/plugins/convert.rst @@ -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.