Rename source_weight -> data_source_mismatch_penalty

This commit is contained in:
Šarūnas Nejus 2025-10-07 13:45:06 +01:00
parent c2ab93a946
commit 6e5af90abb
No known key found for this signature in database
3 changed files with 6 additions and 6 deletions

View file

@ -133,7 +133,7 @@ def _get_distance(
dist = Distance()
if info.data_source == data_source:
dist.add("source", config["source_weight"].as_number())
dist.add("source", config["data_source_mismatch_penalty"].as_number())
return dist
@ -150,7 +150,7 @@ class MetadataSourcePlugin(BeetsPlugin, metaclass=abc.ABCMeta):
self.config.add(
{
"search_limit": 5,
"source_weight": 0.5,
"data_source_mismatch_penalty": 0.5,
}
)

View file

@ -50,8 +50,8 @@ 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``.
- **data_source_mismatch_penalty**: 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:
@ -61,7 +61,7 @@ following to your configuration:
plugins: musicbrainz discogs
discogs:
source_weight: 0.0
data_source_mismatch_penalty: 0.0
.. toctree::
:hidden:

View file

@ -106,7 +106,7 @@ Here's an example:
::
spotify:
source_weight: 0.7
data_source_mismatch_penalty: 0.7
mode: open
region_filter: US
show_failures: on