Skip to main content

Test & Release & Deploy Coverage Status PyPi PyPI pyversions MIT license

Autofix (Beets Plugin)

Please note that this plugin is highly experimental.

The beets-autofix plugin helps you to automate the tasks that you keep repeating to maintain your library.

The plugin is a wrapper around some of the plugins that you already have in beets. It iterates through the items you have in your library and calls the individual plugins to execute their jobs as they are configured by you. As of now the list of tasks is hard-coded and you can only chose to enable/disable them during the run.

Installation

The plugin can be installed via:

$ pip install beets-autofix

Usage

Invoke the plugin as:

$ beet autofix [options] [QUERY...]

The following command line options are available:

--max_exec_time=MAX_EXEC_TIME [-m MAX_EXEC_TIME]: Interrupt the execution after this number of seconds.

--version [-v]: Display the version number of the plugin. Useful when you need to report some issue and you have to state the version of the plugin you are using.

Configuration

By default all tasks are disabled:

max_exec_time: 0
tasks:
  missing_file_checker:
    enabled: no
  year_fixer:
    enabled: no
  audio_conversion:
    enabled: no
  tag_cleaner:
    enabled: no
  ab_data_fetcher:
    enabled: no
  xtractor:
    enabled: no
  genre_finder:
    enabled: no

You need to override the default configuration and enable the tasks you want to run.

The max_exec_time allows you to interrupt the execution after a certain number of seconds. For no limit set it to 0.

Tasks

The following tasks are available:

This task is not related to any plugin. It will iterate through all library items and check if the file indicated by the path attribute exists. If it does not exist, it deletes the library item.

The YearFixer plugin will attempt to fix items with missing year or original_year attributes missing. The particularity of the yearfixer plugin is that given a specific release, to look for the original_year attribute, it will search for all recordings of the same title (by the same artist) in the MB database and chose the earliest year that song has been released.

This plugin is based on the convert plugin and triggers the conversion in two cases:

  • if the format of the item is does not correspond to the format specified in the convert plugin configuration
  • if the bitrate of the item is greater than the bitrate specified in the convert plugin configuration

In both cases the audio file will be converted according to the convert plugin configuration. The converted audio file will be attached to the library item whilst the original audio file will be deleted.

This task works with the zero plugin and triggers only if in the configuration you use the fields configuration option (it does not work with the keep_fields option for now). If any of those fields are found to be non-empty, the item will be passed to the zero plugin for processing.

This task will check if any of the following attributes are missing from the library item and will call the acousticbrainz plugin to fetch such data from the acousticbrainz database. The task will then set the values for the missing attributes. If the force configuration option is set to yes in the configuration of the acousticbrainz plugin then all attributes will be set.

The attributes checked and set are: average_loudness, bpm, danceable, gender, genre_rosamerica, voice_instrumental, mood_acoustic, mood_aggressive, mood_electronic, mood_happy, mood_party, mood_relaxed, mood_sad (some more to come soon)

This task and the related plugin works on exactly the same attributes as the ones listed in the AcousticBrainz Data Fetcher task. The difference is that the xtractor plugin does not rely on external databases but uses the Essentia extractor binaries to extract such data from your audio files.

This task will call the lastgenre plugin to find out the genre of a specific song. If that fails, it will fall back to the genre_rosamerica attribute estimated by the Essentia high level extractor and map the genre based on this table:

    "cla" -> "classical"
    "dan" -> "dance"
    "hip" -> "hip-hop"
    "jaz" -> "jazz"
    "pop" -> "pop"
    "rhy" -> "rhythm and blues"
    "roc" -> "rock"
    "spe" -> "speech"

Issues

  • If something is not working as expected please use the Issue tracker.
  • If the documentation is not clear please use the Issue tracker.
  • If you have a feature request please use the Issue tracker.
  • In any other situation please use the Issue tracker.

Other plugins by the same author

Final Remarks

Enjoy!

Metadata

Release files for beets-autofix 0.1.6

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for beets-autofix 0.1.6
File Size Uploaded Provenance Actions
beets_autofix-0.1.6.tar.gz 11.5 kB Without provenance Details for beets_autofix-0.1.6.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for beets-autofix 0.1.6
File Interpreter ABI Platform Actions
beets_autofix-0.1.6-py3-none-any.whl Python 3 none any Details for beets_autofix-0.1.6-py3-none-any.whl

Total release size: 28.0 kB

Release files / beets_autofix-0.1.6.tar.gz

Download URL beets_autofix-0.1.6.tar.gz
Size 11.5 kB
Tags Source
SHA-256 checksum
How to use checksums
bc3fd602782dfee06552e68db2f10d768827ad2c670a149e926c80f1247f7d81
BLAKE2b-256 checksum
How to use checksums
64a569dd3b6065dbac3ace8da343f1db982104854bd97c1898b2718ceff56a16
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.0 CPython/3.12.3

Release files / beets_autofix-0.1.6-py3-none-any.whl

Download URL beets_autofix-0.1.6-py3-none-any.whl
Size 16.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2a0251880079e1520d42fd80999292bb35e9f85f600620b43f945fe6b97b395f
BLAKE2b-256 checksum
How to use checksums
a258800f1e897e5350fd3c73f28a70df192e8c47d6c9fed3cf1d40f12e2cc4dc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.0 CPython/3.12.3

Security for beets-autofix 0.1.6

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page