mirror of
https://github.com/beetbox/beets.git
synced 2025-12-06 08:39:17 +01:00
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. |
||
|---|---|---|
| .. | ||
| _static | ||
| _templates/autosummary | ||
| api | ||
| dev | ||
| guides | ||
| plugins | ||
| reference | ||
| .gitignore | ||
| changelog.rst | ||
| code_of_conduct.rst | ||
| conf.py | ||
| contributing.rst | ||
| faq.rst | ||
| index.rst | ||
| Makefile | ||
| modd.conf | ||
| team.rst | ||