beets/docs
Šarūnas Nejus 455d620ae0
Fix data source penalty application logic
The data_source penalty was not being calculated correctly because
`_get_distance` was being called for **all** enabled metadata plugins
which eventually meant that matches were being penalised needlessly.

This commit refactors the distance calculation to:
- Remove the plugin-based track_distance() and album_distance() methods
  that were applying penalties incorrectly
- Calculate data_source penalties directly in track_distance() and
  distance() functions when sources don't match
- Use a centralized get_penalty() function to retrieve plugin-specific
  penalty values via a registry with O(1) lookup
- Change default data_source_penalty from 0.0 to 0.5 to ensure
  mismatches are penalized by default
- Add data_source to get_most_common_tags() to determine the likely
  original source for comparison

This ensures that tracks and albums from different data sources are
properly penalized during matching, improving match quality and
preventing cross-source matches.
2025-10-10 20:36:33 +01:00
..
_static Transparent background logo for docs 2023-10-29 10:30:33 +01:00
_templates/autosummary A number of smaller additions. 2025-09-04 12:49:43 +01:00
api Add index for API Reference 2025-09-04 12:49:48 +01:00
dev Fix formatting issues 2025-09-04 12:49:48 +01:00
guides Fix musicbrainz plugin documentation (#6024) 2025-09-18 11:33:55 +02:00
plugins Fix data source penalty application logic 2025-10-10 20:36:33 +01:00
reference Make naming consistent with the field name 2025-10-10 20:36:33 +01:00
.gitignore Streamlined auto api referencing for documentation (#5795) 2025-05-22 11:35:40 +02:00
changelog.rst Fix data source penalty application logic 2025-10-10 20:36:33 +01:00
code_of_conduct.rst Update docstrfmt 2025-09-04 12:49:44 +01:00
conf.py Increment version to 2.4.0 2025-09-13 16:47:21 +00:00
contributing.rst Update docstrfmt 2025-09-04 12:49:44 +01:00
faq.rst Fix musicbrainz plugin documentation (#6024) 2025-09-18 11:33:55 +02:00
index.rst Reformat all docs using docstrfmt 2025-08-10 16:25:05 +01:00
Makefile Streamlined auto api referencing for documentation (#5795) 2025-05-22 11:35:40 +02:00
modd.conf Switch to modd for live docs build 2017-12-21 11:39:08 -05:00
team.rst Reformat all docs using docstrfmt 2025-08-10 16:25:05 +01:00