Commit Graph
2984 Commits
Author SHA1 Message Date
Théophile Bastian 666c412b0e plugins/web: fix endpoints /…/values/…
Following #4709 and #5447, the web plugin used single-quotes (ie. string
litteral) in the SQL query for table columns. Thus, for instance, the query
`GET /item/values/albumartist` would return the litteral "albumartist"
instead of a list of unique album artists.
2025-11-15 21:02:38 +01:00
Aidan Epstein 672bf0bf41 Add tests. 2025-11-11 17:08:46 -08:00
Emi Katagiri-Simpson 29a5b06f67 Merge remote-tracking branch 'upstream/master' into dereference-symlinks-while-hardlinking 2025-11-11 07:58:10 -05:00
Šarūnas Nejus d486885af3 pyupgrade Python 3.10 2025-11-08 12:09:52 +00:00
Emi Katagiri-Simpson 0e74605efd Merge remote-tracking branch 'upstream/master' into dereference-symlinks-while-hardlinking 2025-11-06 20:30:40 -05:00
Emi Katagiri-Simpson 86a74970f9 Merge remote-tracking branch 'upstream/master' into HEAD 2025-11-06 20:11:57 -05:00
Sebastian Mohr a59e41a883 tests: move command tests into dedicated files
Moved tests related to ui into own folder.
Moved 'modify' command tests into own file.
Moved 'write' command tests into own file.
Moved 'fields' command tests into own file.
Moved 'do_query' test into own file.
Moved 'list' command tests into own file.
Moved 'remove' command tests into own file.
Moved 'move' command tests into own file.
Moved 'update' command tests into own file.
Moved 'show_change' test into test_import file.
Moved 'summarize_items' test into test_import file.
Moved 'completion' command test into own file.
2025-11-03 14:00:58 +01:00
asardaes c087851770 Prefer alias if import languages not defined 2025-11-01 13:52:14 +01:00
asardaes 040b2dd940 Add custom_tags_only mode for mbpseudo plugin 2025-11-01 13:52:14 +01:00
asardaes cb758988ed Fix data source penalty for mbpseudo 2025-11-01 13:52:14 +01:00
asardaes 160297b086 Add tests for mbpseudo plugin 2025-11-01 13:51:34 +01:00
J0J0 Todos 02a662e923 importfeeds: Fix tests
- Use self.config instead of global config, which was interfering whith
  other plugin tests (test_importsource) when run alongside (eg in CI)
- Rename test
2025-10-29 08:50:01 +01:00
Doron Behar e181ebeaae importsource: Add new plugin (+docs/tests/changlog) 2025-10-29 08:50:01 +01:00
Emi Katagiri-Simpson 19665cd8cf Merge remote-tracking branch 'upstream/master' into dereference-symlinks-while-hardlinking 2025-10-28 17:13:51 -04:00
Emi Katagiri-Simpson 1e1c649398 Use already generated config path in test_edit_config_with_custom_path 2025-10-28 16:56:43 -04:00
Emi Katagiri-Simpson 1a1fcbc3bc Merge remote-tracking branch 'upstream/master' into edit-custom-config 2025-10-28 16:55:39 -04: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
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