Commit graph

13088 commits

Author SHA1 Message Date
Šarūnas Nejus
61cbc39c4a
Revert "Add git commit suffix to __version__ for development installs (#5967)" 2025-10-14 23:39:27 +01:00
Šarūnas Nejus
efe1a67e84
Revert "Fix dynamic versioning plugin not correctly installed in workflow (#6094)"
This reverts commit dc9b498ee8, reversing
changes made to 77842b72d7.
2025-10-14 23:38:01 +01:00
Sebastian Mohr
af022683fe
Legacy plugin copy not copying properties. (#6101)
The recently introduces `data_source_mismatch_penalty` property in the MetadataPlugin
class was not copied in the backwards compatibility layer. This PR
introduces a fixes this such that `cached_properties` are copied to
legacy metadata plugins.

This also includes a test for the expected behavior.

See also [beetcamp
issue](https://github.com/snejus/beetcamp/issues/85#issuecomment-3399273892).
2025-10-14 20:41:31 +02:00
Sebastian Mohr
391ca4ca26 Yet some more simplification. 2025-10-14 20:25:07 +02:00
Sebastian Mohr
365ff6b030 Added test additions 2025-10-14 19:55:50 +02:00
Sebastian Mohr
f339d8a4d3 slight simplification. 2025-10-14 19:55:50 +02:00
Sebastian Mohr
670c300625 Fixed issue with legacy plugin copy not copying properties. Also
added test for it
2025-10-14 19:55:50 +02:00
Šarūnas Nejus
ecea47320c
Load the last plugin class found in the namespace (#6100)
- Modified `_get_plugin` function to use `reversed()` when iterating
through `namespace.__dict__.values()`
- This ensures that we load _the last_ plugin class found in the
namespace.

Fixes #6093
2025-10-14 17:05:29 +01:00
Šarūnas Nejus
f33c030ebb
Convert replacements and Include URLs for :class: refs in release notes 2025-10-14 16:54:52 +01:00
Šarūnas Nejus
fbc12a358c
Add changelog note 2025-10-14 16:54:52 +01:00
Šarūnas Nejus
13f40de5bb
Make _verify_config method private to remove it from the docs 2025-10-14 16:21:33 +01:00
Šarūnas Nejus
7fa9a30b89
Add note regarding the last plugin class 2025-10-14 16:17:29 +01:00
Šarūnas Nejus
75a945d3d3
Initialise the last plugin class found in the plugin namespace 2025-10-14 15:14:55 +01:00
Šarūnas Nejus
dc9b498ee8
Fix dynamic versioning plugin not correctly installed in workflow (#6094)
It seems like the ci wokflows did not install the
poetry-dynamic-versioning correctly. We need a pipx inject for it to
work as expected.

closes #6089
2025-10-14 13:04:18 +01:00
Sebastian Mohr
31488e79da Removed additional linebreaks. 2025-10-14 12:58:54 +01:00
Sebastian Mohr
febb1d2e08 Removed test release file. 2025-10-14 12:58:54 +01:00
Sebastian Mohr
7f15a46081 Added perms to flow. 2025-10-14 12:58:54 +01:00
Sebastian Mohr
ac31bee4ca Reverted placeholder. 2025-10-14 12:58:54 +01:00
Sebastian Mohr
4ea37b4579 Added changelog entry fixed action to use sha. 2025-10-14 12:58:54 +01:00
Sebastian Mohr
d01f960e4f Fixed an issue where the poetry-dynamic-versioning-plugin was not used in
release artifacts.

Also adds a test_release workflow which allows to create the release
distribution.
2025-10-14 12:58:54 +01:00
Sebastian Mohr
77842b72d7
Adds a zero_disc_if_single_disc to the zero plugin (#6015)
Adds a `omit_single_disc` boolean configuration option to the zero
plugin for writing to files. Adds the logic that, if disctotal is set and 
there is only one disc in disctotal, that the disc is not set.

This keeps tags cleaner, only using disc on multi-disc albums. The
disctotal is not touched, particularly as this is not usually displayed
in most clients.

The field is removed only for writing the tags, but the disc number is
maintained in the database to avoid breaking anything that may depend on
a disc number or avoid possible loops or failed logic.

A column of disc 1 makes me feel there should be a disc 2, when most
albums are a single disc only.
2025-10-14 04:23:35 +02:00
Michael Krieger
df8cd23ae7 Add back tests as they were.
Add back tests as they were.
2025-10-14 03:17:34 +01:00
Michael Krieger
dc13308784 Remove tests. Update docs. Remove unnecessary return
Remove tests.  Update docs.  Remove unnecessary return.
2025-10-14 03:17:34 +01:00
Michael Krieger
b1c87cd98c Change parameter name, add return, add tests
Change the parameter name to omit_single_disc (vs previously zero_disc_if_single_disc)

Add return of 'fields_set' so that, if triggered by the command line `beets zero`, it will still effect the item.write.

Added tests.
2025-10-14 03:17:34 +01:00
Michael Krieger
5fc15bcfa4 Misc formatting changes 2025-10-14 03:17:34 +01:00
Michael Krieger
33b350a612 Adds a zero_disc_if_single_disc to the zero plugin
Adds a zero_disc_number_if_single_disc boolean to the zero plugin for writing to files. Adds the logic that, if disctotal is set and there is only one disc in disctotal, that the disc is not set.

This keeps tags cleaner, only using disc on multi-disc albums. The disctotal is not touched, particularly as this is not usually displayed in most clients.

The field is removed only for writing the tags, but the disc number is maintained in the database to avoid breaking anything that may depend on a disc number or avoid possible loops or failed logic.
2025-10-14 03:17:34 +01:00
Sebastian Mohr
41e314247d
Modernize getting started guide and remove old contact info (#5807)
## Description

- removes all mailing list references in doc. 
- removes outdated installation instructions (python3.8 + slackware)
- modernizes the getting started guide

closes #5462
2025-10-11 15:07:26 +02:00
Sebastian Mohr
dcec327942 Developer Resources card now links to doc page. 2025-10-11 14:32:35 +02:00
Sebastian Mohr
dd9917d3f3 Removed yaml hyperlink. Changed dropdown naming. Use full console param
instead of short form.
2025-10-11 14:27:44 +02:00
Sebastian Mohr
32fdad1411 Enhanced changelog entry. 2025-10-11 13:55:29 +02:00
Sebastian Mohr
3a6769d3b9 Set sphinx dependencies as optional 2025-10-11 13:52:35 +02:00
Sebastian Mohr
1270364796 Modernized getting started guide. 2025-10-11 13:52:35 +02:00
Sebastian Mohr
7e81f23de6 Readded (outdated) mac instructions. No idea why they were dropped. 2025-10-11 13:52:35 +02:00
Sebastian Mohr
7caa68a141 Re-added macport instructions. Removed mailing list ref. Added section
header for pip and pipx. Removed python 3.13 attention.
2025-10-11 13:52:35 +02:00
Sebastian Mohr
e30772f0c1 Run formatter. 2025-10-11 13:52:35 +02:00
Sebastian Mohr
1aaaeb49ed Added pipx refernces 2025-10-11 13:52:35 +02:00
Sebastian Mohr
81c622bcec Removed duplicate yet. 2025-10-11 13:52:35 +02:00
Sebastian Mohr
3b5eee59ee Added changelog entry. 2025-10-11 13:52:34 +02:00
Sebastian Mohr
103b501af7 Removed mailing list ref in index.rst 2025-10-11 13:51:20 +02:00
Sebastian Mohr
116357e2f6 Removed outdated installation instructions.
- macport: stuck on 1.6
- slackware: stuck on 1.6
- OpenBSD: stuck on 1.6

Remove twitter reference. Removed mailing list reference.
2025-10-11 13:51:20 +02:00
semohr
6faa4f3ddd Increment version to 2.5.0 2025-10-11 09:58:48 +00:00
Šarūnas Nejus
0e99e3a5a3
Fix autotagger results penalisation due to the data source field (#6077)
This PR refactors the metadata source plugin architecture to fix
incorrect data source penalty calculations during import matching.

**Key Changes:**

- **Fixed distance calculation**: Removed `track_distance()` and
`album_distance()` methods from `MetadataSourcePlugin`. Data source
mismatch penalty is now calculated directly in
`beets/autotag/distance.py`, same as most of the rest of field-based
penalties.

- **Plugin registration**: Metadata source plugins now register
themselves in `_instance_by_data_source` dict on instantiation, enabling
efficient penalty lookups.

- **Renamed configuration options**:
  - `source_weight` → `data_source_mismatch_penalty` (plugin-level)
- `match.distance_weights.source` → `match.distance_weights.data_source`
(global matching)

- **Documentation**: added a `yaml` block with default configuration
values to each metadata source documentation page. Included the renamed
penalty field in each to underline that it's available for each data
source.
2025-10-11 00:19:23 +01:00
Šarūnas Nejus
3b38045d01
Only penalize multi data sources on first import 2025-10-10 20:36:33 +01:00
Šarūnas Nejus
90ca0a799a
Consider unseen tracks in data source matching 2025-10-10 20:36:33 +01:00
Šarūnas Nejus
1f62a928ec
Update data source documentation 2025-10-10 20:36:33 +01:00
Šarūnas Nejus
f8887d48b6
Add deprecation warning for <plugin>.source_weight 2025-10-10 20:36:33 +01:00
Šarūnas Nejus
5757579e27
Improve visibility of Distance tests failures 2025-10-10 20:36:33 +01:00
Šarūnas Nejus
e6895bb52d
Reset cached_classproperty cache for every test 2025-10-10 20:36:33 +01:00
Š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
96670cf971
Cache found metadata source plugins 2025-10-10 20:36:33 +01:00