Skip to main content

('A beets plugin to execute repetitive tasks in one go.',)

Project description

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:

Missing File Checker (task name: missing_file_checker) [related plugin: None]

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.

Year Fixer (task name: year_fixer) [related plugin: yearfixer]

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.

Conversion (task name: audio_conversion) [related plugin: convert]

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.

Tag Cleaner (task name: tag_cleaner) [related plugin: zero]

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.

AcousticBrainz Data Fetcher (task name: ab_data_fetcher) [related plugin: acousticbrainz]

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)

Xtractor(task name: xtractor) [related plugin: xtractor]

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.

Genre Finder (task name: genre_finder) [related plugin: lastgenre]

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!

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_autofix-0.1.6.tar.gz (11.5 kB view details)

Uploaded Source

Built Distribution

beets_autofix-0.1.6-py3-none-any.whl (16.5 kB view details)

Uploaded Python 3

File details

Details for the file beets_autofix-0.1.6.tar.gz.

File metadata

  • Download URL: beets_autofix-0.1.6.tar.gz
  • Upload date:
  • Size: 11.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.12.3

File hashes

Hashes for beets_autofix-0.1.6.tar.gz
Algorithm Hash digest
SHA256 bc3fd602782dfee06552e68db2f10d768827ad2c670a149e926c80f1247f7d81
MD5 3df29ba0d09bd3d64b8c2a20cf2cd589
BLAKE2b-256 64a569dd3b6065dbac3ace8da343f1db982104854bd97c1898b2718ceff56a16

See more details on using hashes here.

File details

Details for the file beets_autofix-0.1.6-py3-none-any.whl.

File metadata

File hashes

Hashes for beets_autofix-0.1.6-py3-none-any.whl
Algorithm Hash digest
SHA256 2a0251880079e1520d42fd80999292bb35e9f85f600620b43f945fe6b97b395f
MD5 ada898aea6e2e9ff523d33a0e81be86e
BLAKE2b-256 a258800f1e897e5350fd3c73f28a70df192e8c47d6c9fed3cf1d40f12e2cc4dc

See more details on using hashes here.

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