Commit graph

13264 commits

Author SHA1 Message Date
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
Šarūnas Nejus
01e2eb4665
Add default config yaml to each data source docs 2025-10-10 20:36:33 +01:00
Šarūnas Nejus
203c2176d9
Update data_source_penalty docs 2025-10-10 20:36:33 +01:00
Šarūnas Nejus
e6084cd3ee
Set default data_source_penalty to 0.0 2025-10-10 20:36:33 +01:00
Šarūnas Nejus
60e0efb8ea
Make naming consistent with the field name 2025-10-10 20:36:33 +01:00
Šarūnas Nejus
6e5af90abb
Rename source_weight -> data_source_mismatch_penalty 2025-10-10 20:36:33 +01:00
Šarūnas Nejus
c2ab93a946
Remove redundant source_weight defaults 2025-10-10 20:36:33 +01:00
Martin Atukunda
545213421b
feat(plugin/web): support for nexttrack keypress 2025-10-09 20:11:19 +03:00
Šarūnas Nejus
fe98841e72
Refresh flexible MusicBrainz metadata on reimport (#6064)
Fixes #6036

- [x] Changelog. (Add an entry to `docs/changelog.rst` to the bottom of
one of the lists near the top of the document.)
2025-10-09 09:58:55 +01:00
Alok Saboo
92a2233e0d remove releasegroup_id 2025-10-08 09:59:07 -04:00
Alok Saboo
79494b809d Merge remote-tracking branch 'upstream/master' into mb_fix 2025-10-07 20:01:27 -04:00
Alok Saboo
87874952fa Refactor reimport fresh fields: consolidate REIMPORT_FRESH_FIELDS_ITEM and REIMPORT_FRESH_FIELDS_ALBUM definitions 2025-10-07 19:56:39 -04:00
Šarūnas Nejus
d4a0c02ca3
fromfilename plugin: proposed fix for #5218, some improvements (#5311)
### b5216a0 is a proposed fix for #5218

We don't assume anymore that if the pattern lacks the "artist" group it
also has the "title" group (this was causing the "title" KeyError, when
the pattern containg only the `?P<track>` group is used).
Instead, we check for existence of "title" before assigning
"title_field", otherwise we let the last pattern (which will always
match) to assign it. The only slight drawback is that files like
"01.mp3" will also get "01" as title (besides the "1" track number),
instead of having no title, but I guess that is not going to cause any
major problem in the rest of the import procedure (e.g. track matching
after a search). On the other hand, I guess allowing a file to have no
title would require a substantial rewriting of the plugin, since the
empty string is in BAD_TITLE_PATTERNS.

### 0966042 adds a log message about the pattern being tried
This is useful while debugging changes to the regexps in PATTERNS.
I used loglevel "debug" for this message, should we use "debug" also for
other messages (currently using level "info")?

### e6b7735 refactors the regexps in PATTERNS

I reviewed the regexps (especially after the changes I made some time
ago in 84cf336) and tried to make them cleaner.
- Allow " - " and "-" as separator between track/artist/title fields:
that should cover two common filename conventions: using spaces (e.g.
`01 - Artist Name - Title of the song`) or not using spaces (e.g.
`01-artist_name-title_of_the_song`). Some regexp groups are non-greedy,
to avoid capturing unwanted leading/trailing spaces in artist/titles; we
could think about some other enhancements, e.g. automatically converting
underscores to spaces in artist/title names, but I guess the main use of
the plugin is not to produce a perfectly formatted title, but a
sufficient meaningful one to be used as reference in the following
stages of the update procedure.
- Allow `?P<tag>` groups by making them optional in the first two
patterns (instead of having two versions of the pattern, with or without
tag). BTW I'm not sure what these groups are about: we optionally check
for them in the plugin, but we never use them to assign any metadata.
- Allow optional "." after the track number
- In the third pattern: also allow "_" as separator (e.g. for file names
like `01_some_tack.mp3`)
2025-10-07 23:39:48 +01:00
Alok Saboo
6c06f2a77e Merge remote-tracking branch 'upstream/master' into mb_fix 2025-10-07 18:08:00 -04:00
Alok Saboo
c59aff9e27 Added the MusicBrainz flex fields directly to the importer 2025-10-07 18:02:04 -04:00
Alok Saboo
c5f5ffc027 Added releasegroup_id to _MB_REIMPORT_FRESH_FIELDS_ITEM list 2025-10-06 10:55:49 -04:00
J0J0 Todos
152cafbf69 fromfilename: Fix tiny changelog formatting issue 2025-10-06 11:35:55 +02:00
J0J0 Todos
a642609faa
Merge branch 'master' into ffnp 2025-10-06 11:06:10 +02:00
Sebastian Mohr
08d9f34df5
Discogs: artist name variation support + artist credit support. (#6050)
Implements #3354, updates #6040. This PR also improves typehints for the discogs plugin.

The name variations provided by Discogs can now be used by the
auto-tagger through 3 config options.
By default, the plugin will write the variation to the tag
`artist_credit`, but through three config options can also write it
to the album artist tag, the track's artist tag, or any combination of
the three.

This PR contains a small addition on #6040, letting the string used to
join featured artists be customized.

The new configuration options available, and their defaults, are as
follows:

```yaml
discogs:
  featured_string: "Feat."
  anv:
    artist_credit: True
    album_artist: False
    artist: False
```
2025-10-05 12:54:31 +02:00
henry
90120e451d
Merge branch 'master' into discogs-anv-support 2025-10-04 12:00:51 -07:00
Henry
ed73903deb type corrections 2025-10-04 11:59:15 -07:00
Henry
2a80bdef2e Added type hints to all functions 2025-10-04 11:03:17 -07:00
Henry
a909dddd16 adding typechecks, need to fix the medium discrepancy 2025-10-03 18:52:37 -07:00
J0J0 Todos
347802afea
fix spacing for "finding tags for" prompt (#6067) 2025-10-04 01:06:56 +02:00
Henry
267428f0a4 Merge branch 'master' of github.com:henry-oberholtzer/beets into discogs-anv-support 2025-10-03 15:05:48 -07:00
Henry
b9a840a2a3 Update all functions with types 2025-10-03 15:01:34 -07:00
Henry
f5acdec2b1 Update configuration format. 2025-10-03 14:44:22 -07:00
MinchinWeb
033e613016 fix spacing for "finding tags for" prompt 2025-10-03 14:48:56 -06:00