From 5f51b7b38e0378e2889691c05b66f99a5d80bd8f Mon Sep 17 00:00:00 2001 From: Alexander Miller Date: Tue, 1 Oct 2019 07:42:10 +0200 Subject: [PATCH 1/3] docs/plugins/discogs.rst: Update plugin documentation Add Configuration section and describe the 'source_weight' option. --- docs/plugins/discogs.rst | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/docs/plugins/discogs.rst b/docs/plugins/discogs.rst index 622a085b4..866532233 100644 --- a/docs/plugins/discogs.rst +++ b/docs/plugins/discogs.rst @@ -43,6 +43,13 @@ documentation), login to `Discogs`_, and visit the token`` button, and place the generated token in your configuration, as the ``user_token`` config option in the ``discogs`` section. +Configuration +------------- + +- **source_weight**: Penalty applied to Discogs matches during import. Set to + 0.0 to disable. + Default: ``0.5``. + Troubleshooting --------------- From c4ad4c69cb520c3ab4bdfc33ef8dbb94ea11b74a Mon Sep 17 00:00:00 2001 From: Alexander Miller Date: Tue, 1 Oct 2019 20:57:49 +0200 Subject: [PATCH 2/3] docs/plugins/index.rst: Describe configuration of metadata source plugins --- docs/plugins/index.rst | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/docs/plugins/index.rst b/docs/plugins/index.rst index b9f512b1f..24e427dce 100644 --- a/docs/plugins/index.rst +++ b/docs/plugins/index.rst @@ -35,6 +35,27 @@ like this:: pip install beets[fetchart,lyrics,lastgenre] +.. _metadata-source-plugin-configuration: + +Using Metadata Source Plugins +----------------------------- + +Some plugins provide sources for metadata in addition to MusicBrainz. These +plugins share the following configuration option: + +- **source_weight**: Penalty applied to matches during import. Set to 0.0 to + disable. + Default: ``0.5``. + +For example, to equally consider matches from Discogs and MusicBrainz add the +following to your configuration:: + + plugins: discogs + + discogs: + source_weight: 0.0 + + .. toctree:: :hidden: From 279dd314ae38bc7334a5d2303e1a464537d0df1a Mon Sep 17 00:00:00 2001 From: Alexander Miller Date: Tue, 1 Oct 2019 21:16:57 +0200 Subject: [PATCH 3/3] docs/plugins: Centralize documentation of source_weight option --- docs/plugins/beatport.rst | 5 +++++ docs/plugins/deezer.rst | 11 +---------- docs/plugins/discogs.rst | 4 +--- docs/plugins/spotify.rst | 6 +++--- 4 files changed, 10 insertions(+), 16 deletions(-) diff --git a/docs/plugins/beatport.rst b/docs/plugins/beatport.rst index d645e2043..cbf5b4312 100644 --- a/docs/plugins/beatport.rst +++ b/docs/plugins/beatport.rst @@ -36,6 +36,11 @@ also search for an id like so: beet import path/to/music/library --search-id id +Configuration +------------- + +This plugin can be configured like other metadata source plugins as described in :ref:`metadata-source-plugin-configuration`. + .. _requests: https://docs.python-requests.org/en/latest/ .. _requests_oauthlib: https://github.com/requests/requests-oauthlib .. _Beatport: https://beetport.com diff --git a/docs/plugins/deezer.rst b/docs/plugins/deezer.rst index f283df1b2..29f561e6a 100644 --- a/docs/plugins/deezer.rst +++ b/docs/plugins/deezer.rst @@ -22,13 +22,4 @@ prompt during import:: Configuration ------------- -Put these options in config.yaml under the ``deezer:`` section: - -- **source_weight**: Penalty applied to Deezer matches during import. Set to - 0.0 to disable. - Default: ``0.5``. - -Here's an example:: - - deezer: - source_weight: 0.7 +This plugin can be configured like other metadata source plugins as described in :ref:`metadata-source-plugin-configuration`. diff --git a/docs/plugins/discogs.rst b/docs/plugins/discogs.rst index 866532233..6c16083ee 100644 --- a/docs/plugins/discogs.rst +++ b/docs/plugins/discogs.rst @@ -46,9 +46,7 @@ token`` button, and place the generated token in your configuration, as the Configuration ------------- -- **source_weight**: Penalty applied to Discogs matches during import. Set to - 0.0 to disable. - Default: ``0.5``. +This plugin can be configured like other metadata source plugins as described in :ref:`metadata-source-plugin-configuration`. Troubleshooting --------------- diff --git a/docs/plugins/spotify.rst b/docs/plugins/spotify.rst index 5d6ae8f47..96b198f64 100644 --- a/docs/plugins/spotify.rst +++ b/docs/plugins/spotify.rst @@ -52,6 +52,9 @@ prompt during import:: Configuration ------------- +This plugin can be configured like other metadata source plugins as described in :ref:`metadata-source-plugin-configuration`. In addition, the following +configuration options are provided. + The default options should work as-is, but there are some options you can put in config.yaml under the ``spotify:`` section: @@ -79,9 +82,6 @@ in config.yaml under the ``spotify:`` section: track/album/artist fields before sending them to Spotify. Can be useful for changing certain abbreviations, like ft. -> feat. See the examples below. Default: None. -- **source_weight**: Penalty applied to Spotify matches during import. Set to - 0.0 to disable. - Default: ``0.5``. Here's an example::