Commit graph

2967 commits

Author SHA1 Message Date
Doron Behar
e181ebeaae importsource: Add new plugin (+docs/tests/changlog) 2025-10-29 08:50:01 +01:00
Ember Light
00e3da1a92
Merge branch 'master' into ftintitle-continue-even-if-albumartist-and-artist-is-the-same 2025-10-20 15:24:43 +02:00
Jacob Danell
027b775fcd Change arg name 2025-10-20 15:22:27 +02:00
cvx35isl
1275ccf8c1
play plugin: $playlist marker for precise control where the playlist … (#4728)
…file is placed in the command

## Description

see included doc; placing the playlist filename at the end of command
just isn't working for all players

I have this in use with `mpv`

Co-authored-by: cvx35isl <cvx35isl@users.noreply.github.com>
Co-authored-by: J0J0 Todos <2733783+JOJ0@users.noreply.github.com>
2025-10-19 08:38:20 +02:00
Ember Light
ca8df30ec3 Add missing test parameter 2025-10-16 19:06:56 +02:00
Ember Light
f275835cd3 Add test 2025-10-16 18:49:24 +02:00
Šarūnas Nejus
88011a7c65
Show genre change using show_model_changes 2025-10-15 11:14:26 +01:00
Šarūnas Nejus
c2d5c1f17c
Update test 2025-10-15 09:55:51 +01:00
J0J0 Todos
654c14490e
lastgenre: Refactor test_pretend to pytest 2025-10-15 09:54:41 +01:00
J0J0 Todos
d617e67199
lastgenre: Fix test_pretend_option
only one arg is passed to the info log anymore.
2025-10-15 09:52:32 +01:00
henry
0bf248d355
Add custom feat words for ftintitle (#6090)
## Description

For non English tracks (Swedish in my case) feat. words might be
something that ftintitle doesn't pick up.
Eg. for the song `Promoe med Afasi - Inflation`
[https://musicbrainz.org/recording/8e236347-61d6-4e11-9980-52f4cc6b905f](https://musicbrainz.org/recording/8e236347-61d6-4e11-9980-52f4cc6b905f)
the word `med` is `feat.` in Swedish.
With this PR you can add what ever word you wish to match as feat. so it
should cover any kind of language.

The config.yaml could look like this:
ftintitle:
  custom_feat_words: ["med"]

## To Do

<!--
- If you believe one of below checkpoints is not required for the change
you
are submitting, cross it out and check the box nonetheless to let us
know.
  For example: - [x] ~Changelog~
- Regarding the changelog, often it makes sense to add your entry only
once
reviewing is finished. That way you might prevent conflicts from other
PR's in
that file, as well as keep the chance high your description fits with
the
  latest revision of your feature/fix.
- Regarding documentation, bugfixes often don't require additions to the
docs.
- Please remove the descriptive sentences in braces from the enumeration
below,
  which helps to unclutter your PR description.
-->

- [x] Documentation. (If you've added a new command-line flag, for
example, find the appropriate page under `docs/` to describe it.)
- [x] Changelog. (Add an entry to `docs/changelog.rst` to the bottom of
one of the lists near the top of the document.)
- [x] Tests. (Very much encouraged but not strictly required.)
2025-10-14 20:38:02 -07:00
Sebastian Mohr
365ff6b030 Added test additions 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
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
Ember Light
b95a17d8d3 remove feat from custom_feat_words 2025-10-12 22:40:27 +02:00
Ember Light
37a5f9cb15 Add custom feat words 2025-10-12 20:47:51 +02: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
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
60e0efb8ea
Make naming consistent with the field name 2025-10-10 20:36:33 +01:00
J0J0 Todos
a642609faa
Merge branch 'master' into ffnp 2025-10-06 11:06:10 +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
f5acdec2b1 Update configuration format. 2025-10-03 14:44:22 -07:00
Sebastian Mohr
4782e96599
Move vfs.py to beetsplug._utils package to avoid polluting core namespace (#6017)
This PR moves the `vfs.py` module, which is only used by plugins, to
avoid polluting the main beets namespace. Also exposes the `vfs` and
`art` module from beets with a deprecation warning.
2025-10-01 12:28:18 +02:00
Henry
9371ab81ec Merge remote-tracking branch 'origin' into discogs-anv-support 2025-09-30 19:23:23 -07:00
Vrihub
5f9800ec43
Merge branch 'master' into ffnp 2025-09-30 17:41:13 +02:00
Vrihub
638afc3d2c Refactor tests using pytest 2025-09-30 15:54:33 +02:00
Sebastian Mohr
89c2e10680 Removed typealias, worked locally with mypy but does seem to cause
issues with the ci. Also python 3.9 requires unions here...
2025-09-30 13:39:49 +02:00
Sebastian Mohr
caebf185f1 Removed unused ParamSpec and added a consistency check in the tests. 2025-09-30 13:37:51 +02:00
Sebastian Mohr
461bc049a0 Enhanced custom logger typing and logging tests 2025-09-30 13:37:51 +02:00
Šarūnas Nejus
7954671c73
Mock DummyPlugin properly 2025-09-29 11:39:16 +01:00
Henry
c44c535b22 Fully parametrize testing 2025-09-28 10:49:56 -07:00
Henry
b1903417f4 Add artist credit support, artist name variation support, more flexible featured credit. 2025-09-27 14:29:25 -07:00
Henry
1cf2254e74 Merge branch 'master' into dev 2025-09-27 11:48:52 -07:00
Henry
dd57c0da2d improve flexibility of use of anv on artist tracks 2025-09-27 10:42:29 -07:00
Henry
85201a4e17 merge with master branch 2025-09-27 08:04:53 -07:00
pSpitzner
cc0024e089 Spotify tests are now consistent with quote change 2025-09-27 13:22:41 +02:00
Henry
1e677d57c1 Updates to documentation 2025-09-26 21:37:18 -07:00
Henry
0ec6689395 test updates, one case still failing 2025-09-26 17:56:25 -07:00
Henry
5a43d6add4 Testing and implemented anv method, also added Featuring customizable string 2025-09-26 16:01:33 -07:00
Henry
533aa6379b Test working, need to implement anv now 2025-09-25 22:38:02 -07:00
Henry Oberholtzer
9c8172be12 Write initial ANV test 2025-09-26 01:55:28 +02:00
Henry
b61306ea0d Fixes, test improvement, rebase to master 2025-09-25 08:39:38 -07:00
Henry
43f2d423fa testing, updated changelog 2025-09-25 08:19:46 -07:00
Henry
876c57c8b3 Featured artists extracted and appended, need to see if join needs to be variable 2025-09-25 08:19:46 -07:00
Henry
5c03672874 Test written, beginning fix 2025-09-25 08:19:46 -07:00