Skip to main content

ImportModifyInfo Plugin for Beets

Project description

ImportModifyInfo Plugin for Beets

PyPI Status Python Version License

Read the documentation at https://beets-importmodifyinfo.readthedocs.io/ The Ethical Source Principles Contributor Covenant Tests Codecov

pre-commit Ruff codestyle

The ImportModifyInfo Plugin for Beets applies modifications to received metadata before import. This is largely intended to correct issues with imported metadata which would otherwise be lost on running mbsync. This plugin is inspired by the ImportReplace Plugin and my old modifyonimport plugin, but I found that those modifications would often be lost when running mbsync or equivalent. There is a limitation to the way this plugin works which is important to understand, please read the Limitations and Caveats section.

Limitations and Caveats

This plugin's configuration looks like a command-line from the modify command. This is done for convenience, and to allow one to limit the scope of the modifications using a typical beets query. This is not modify, however, as the queries are against objects created from the importer, and modifications are made to the importer info, not the items in your library.

This means that existing metadata from the files being imported is unavailable, as is existing metadata in the database when using import -L. This only has access to the metadata coming from the importer, i.e. MusicBrainz.

Despite this limitation, it's valuable for correcting issues with importer metadata, or to make the imported metadata consistent.

Installation

As the beets documentation describes in Other plugins, to use an external plugin like this one, there are two options for installation:

  • Make sure it’s in the Python path (known as sys.path to developers). This just means the plugin has to be installed on your system (e.g., with a setup.py script or a command like pip or easy_install). For example, pip install beets-importmodifyinfo.
  • Set the pluginpath config variable to point to the directory containing the plugin. (See Configuring) This would require cloning or otherwise downloading this repository before adding to the pluginpath.

Configuring

First, enable the importmodifyinfo plugin (see Using Plugins).

To configure the plugin, make a importmodifyinfo: section in your configuration file. Sections may be added for modify_albuminfo and modify_trackinfo, each of which is a list of strings as you would supply to the modify command.

For example:

importmodifyinfo:
  modify_albuminfo:
    - album:'some album' albumtype=ep albumtypes='ep; remix'
  modify_trackinfo:
    - album:'some album' title:'some title' title='some other title'

Using

There is no direct usage other than the configuration, as these modifications are automatically applied during the import or sync process.

Contributing

Contributions are very welcome. To learn more, see the Contributor Guide.

License

Distributed under the terms of the MIT license, ImportModifyInfo Plugin for Beets is free and open source software. This software prioritizes meeting the criteria of the Ethical Source Principles, though it does not currently utilize an ethical source license.

Issues

If you encounter any problems, please file an issue along with a detailed description.

Credits

This project is a plugin for the beets project, and would not exist without that fantastic project. This project was generated from @cjolowicz's Hypermodern Python Cookiecutter template.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

beets_importmodifyinfo-0.9.0.tar.gz (6.5 kB view hashes)

Uploaded Source

Built Distribution

beets_importmodifyinfo-0.9.0-py3-none-any.whl (6.7 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page