Commit graph

14 commits

Author SHA1 Message Date
Š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
Šarūnas Nejus
01e2eb4665
Add default config yaml to each data source docs 2025-10-10 20:36:33 +01:00
Šarūnas Nejus
d00d51e0bf
Add configurable search_limit to Spotify and Deezer plugins 2025-08-31 18:48:46 +01:00
Sebastian Mohr
279c828369 run docstrfmt 2025-08-26 13:41:11 +02:00
Sebastian Mohr
f81684e188 Moved construct search into SearchApiMetadataSource to dedupe some
deezer and spotify functionalities.
2025-08-26 13:41:11 +02:00
Šarūnas Nejus
ab5acaabb3
Reformat all docs using docstrfmt 2025-08-10 16:25:05 +01:00
Šarūnas Nejus
769dcdc88a
Docs: fix linting issues 2025-08-10 16:16:02 +01:00
Alok Saboo
edda4a588d Add changelog and docs 2023-07-10 08:32:29 -04:00
Alexander Miller
279dd314ae docs/plugins: Centralize documentation of source_weight option 2019-10-01 21:19:35 +02:00
Adrian Sampson
bebb725352 Docs tweaks for #3355 2019-09-14 09:35:21 -04:00
Rahul Ahuja
732e372ed2 Rename/move to plugins.MetadataSourcePlugin, fix formatting 2019-09-09 17:31:42 -07:00
Rahul Ahuja
8c84daf77a Fix doc links 2019-09-01 19:12:21 -07:00
Rahul Ahuja
ca33f190a5 Add deezer, spotify docs to autotagger index 2019-09-01 18:58:03 -07:00
Rahul Ahuja
2cf55ee893 Add deezer.rst doc, remove unused options 2019-09-01 18:33:27 -07:00