| 1 |
MusicBrainz Plugin |
| 2 |
================== |
| 3 |
|
| 4 |
The ``musicbrainz`` plugin extends the autotagger's search capabilities to |
| 5 |
include matches from the MusicBrainz_ database. |
| 6 |
|
| 7 |
.. _musicbrainz: https://musicbrainz.org/ |
| 8 |
|
| 9 |
Installation |
| 10 |
------------ |
| 11 |
|
| 12 |
To use the ``musicbrainz`` plugin, enable it in your configuration (see |
| 13 |
:ref:`using-plugins`) |
| 14 |
|
| 15 |
.. _musicbrainz-config: |
| 16 |
|
| 17 |
Configuration |
| 18 |
------------- |
| 19 |
|
| 20 |
This plugin can be configured like other metadata source plugins as described in |
| 21 |
:ref:`metadata-source-plugin-configuration`. |
| 22 |
|
| 23 |
Default |
| 24 |
~~~~~~~ |
| 25 |
|
| 26 |
.. code-block:: yaml |
| 27 |
|
| 28 |
musicbrainz: |
| 29 |
host: musicbrainz.org |
| 30 |
https: no |
| 31 |
ratelimit: 1 |
| 32 |
ratelimit_interval: 1.0 |
| 33 |
extra_tags: [] |
| 34 |
genres: no |
| 35 |
genres_tag: genre |
| 36 |
external_ids: |
| 37 |
discogs: no |
| 38 |
bandcamp: no |
| 39 |
spotify: no |
| 40 |
deezer: no |
| 41 |
beatport: no |
| 42 |
tidal: no |
| 43 |
data_source_mismatch_penalty: 0.5 |
| 44 |
search_limit: 5 |
| 45 |
aliases_as_credits: no |
| 46 |
|
| 47 |
.. conf:: host |
| 48 |
:default: musicbrainz.org |
| 49 |
|
| 50 |
The Web server hostname (and port, optionally) that will be contacted by beets. |
| 51 |
You can use this to configure beets to use `your own MusicBrainz database |
| 52 |
<https://musicbrainz.org/doc/MusicBrainz_Server/Setup>`__ instead of the |
| 53 |
`main server`_. |
| 54 |
|
| 55 |
The server must have search indices enabled (see `Building search indexes`_). |
| 56 |
|
| 57 |
Example: |
| 58 |
|
| 59 |
.. code-block:: yaml |
| 60 |
|
| 61 |
musicbrainz: |
| 62 |
host: localhost:5000 |
| 63 |
|
| 64 |
.. conf:: https |
| 65 |
:default: no |
| 66 |
|
| 67 |
Makes the client use HTTPS instead of HTTP. This setting applies only to custom |
| 68 |
servers. The official MusicBrainz server always uses HTTPS. |
| 69 |
|
| 70 |
.. conf:: ratelimit |
| 71 |
:default: 1 |
| 72 |
|
| 73 |
Controls the number of Web service requests per second. This setting applies only |
| 74 |
to custom servers. The official MusicBrainz server enforces a rate limit of 1 |
| 75 |
request per second. |
| 76 |
|
| 77 |
.. conf:: ratelimit_interval |
| 78 |
:default: 1.0 |
| 79 |
|
| 80 |
The time interval (in seconds) for the rate limit. Only applies to custom servers. |
| 81 |
|
| 82 |
.. conf:: enabled |
| 83 |
:default: yes |
| 84 |
|
| 85 |
.. deprecated:: 2.4 Add ``musicbrainz`` to the ``plugins`` list instead. |
| 86 |
|
| 87 |
.. conf:: extra_tags |
| 88 |
:default: [] |
| 89 |
|
| 90 |
By default, beets will use only the album and either artist or |
| 91 |
the MusicBrainz Various Artists ID to query MusicBrainz. Additional |
| 92 |
tags, including track count, can be queried by using the ``extra_tags`` |
| 93 |
setting. |
| 94 |
|
| 95 |
This setting should improve the autotagger results if the metadata with the |
| 96 |
given tags match the metadata returned by MusicBrainz. |
| 97 |
|
| 98 |
Tags supported by this setting: |
| 99 |
|
| 100 |
* ``alias`` (also search for release aliases matching the query) |
| 101 |
* ``barcode`` |
| 102 |
* ``catalognum`` |
| 103 |
* ``country`` |
| 104 |
* ``label`` |
| 105 |
* ``media`` |
| 106 |
* ``tracks`` (number of tracks on the release) |
| 107 |
* ``year`` |
| 108 |
|
| 109 |
Example: |
| 110 |
|
| 111 |
.. code-block:: yaml |
| 112 |
|
| 113 |
musicbrainz: |
| 114 |
extra_tags: [alias, barcode, catalognum, country, label, media, tracks, year] |
| 115 |
|
| 116 |
.. conf:: genres |
| 117 |
:default: no |
| 118 |
|
| 119 |
Use MusicBrainz genre tags to populate (and replace if it's already set) the |
| 120 |
``genre`` tag. This will make it a list of all the genres tagged for the release |
| 121 |
and the release-group on MusicBrainz, separated by "; " and sorted by the total |
| 122 |
number of votes. |
| 123 |
|
| 124 |
.. conf:: external_ids |
| 125 |
|
| 126 |
**Default** |
| 127 |
|
| 128 |
.. code-block:: yaml |
| 129 |
|
| 130 |
musicbrainz: |
| 131 |
external_ids: |
| 132 |
discogs: no |
| 133 |
spotify: no |
| 134 |
bandcamp: no |
| 135 |
beatport: no |
| 136 |
deezer: no |
| 137 |
tidal: no |
| 138 |
|
| 139 |
Set any of the ``external_ids`` options to ``yes`` to enable the MusicBrainz |
| 140 |
importer to look for links to related metadata sources. If such a link is |
| 141 |
available the release ID will be extracted from the URL provided and imported to |
| 142 |
the beets library. |
| 143 |
|
| 144 |
The library fields of the corresponding :ref:`autotagger_extensions` are used to |
| 145 |
save the data as flexible attributes (``discogs_album_id``, ``bandcamp_album_id``, ``spotify_album_id``, |
| 146 |
``beatport_album_id``, ``deezer_album_id``, ``tidal_album_id``). On re-imports |
| 147 |
existing data will be overwritten. |
| 148 |
|
| 149 |
.. conf:: genres_tag |
| 150 |
:default: genre |
| 151 |
|
| 152 |
Either ``genre`` or ``tag``. Specify ``genre`` to use just musicbrainz genre and |
| 153 |
``tag`` to use all user-supplied musicbrainz tags. |
| 154 |
|
| 155 |
.. conf:: aliases_as_credits |
| 156 |
:default: no |
| 157 |
|
| 158 |
Use the "aliases" data from MusicBrainz as the value for ``*_credit`` fields. |
| 159 |
|
| 160 |
.. include:: ./shared_metadata_source_config.rst |
| 161 |
|
| 162 |
.. _building search indexes: https://wiki.musicbrainz.org/History:Development/Search_server_setup |
| 163 |
|
| 164 |
.. _limited: https://musicbrainz.org/doc/XML_Web_Service/Rate_Limiting |
| 165 |
|
| 166 |
.. _main server: https://musicbrainz.org/ |