Commit graph

12907 commits

Author SHA1 Message Date
Šarūnas Nejus
e208d4bee3
chroma: set a default timeout of 10 seconds (#5898)
This prevents the `chroma` plugin from hanging the entire import process
if the AcoustID API fails to respond.
2025-08-25 23:46:44 +01:00
Šarūnas Nejus
e603c2f08e
Merge branch 'master' into chroma-timeout 2025-08-25 23:37:41 +01:00
Šarūnas Nejus
ee18b87e7d
docs: update discogs.rst - add default of index_tracks configuration option (#5935)
In the documentation of the Discogs plugin the ``index_tracks``
configuration option does not include the detail about the default
configuration that is applied when the option is not explicitly managed
in the configuration file.

If this PR is approved, the documentation will include that default ;)
2025-08-25 19:19:16 +01:00
Luccoli
535fcfdbe7 docs: update discogs.rst - add default of index_tracks configuration 2025-08-25 19:14:12 +01:00
Šarūnas Nejus
695ef29e69
docs: add 'pretend' flag to update command example (#5954)
Add `p` as an acceptable flag for the `update` command to match the long
form section of the command's docs
2025-08-25 19:03:35 +01:00
Ryan Waskiewicz
6408b5e280
Add 'pretend' flag to update command example
Add `p` as an acceptable flag for the `update` command to match the long form section of the command's docs
2025-08-24 09:04:21 -04:00
Šarūnas Nejus
6a7bdd6328
Log loaded plugins at the debug level. (#5953)
Rather than clutter the output with (usually) unimportant information.
2025-08-24 13:18:45 +01:00
Šarūnas Nejus
f6a19c7b83
Merge branch 'master' into plugin-loading-debug 2025-08-24 13:13:24 +01:00
Šarūnas Nejus
2504595532
Lastgenre fix early whitelist check breaking canonicalization (#5946)
Fixes #5930.  

- Removed whitelist check immediately after last.fm fetch, which fixes
canonicalization - also unwanted genres need to remain at this point to
get successfully resolved "up" to parent genres
- Removed the `_filter_valid_genres()` helper method and went back to
_inline_ list comprehensions (readability)
- Ensured bug #5649 does not regress (the part were a resolve would kick
out everything and no fallback happens) by running a full
`_resolve_genre()` in each stage - if no genres remain in a stage the
next one is hit.
- Refactored `_get_genre` using a local helper method and returning
immediately on a satisfying outcome (Commits
d28738d92f
and
bb516a3a9c)
- Three new `test_get_genre` cases proof canonicalization works properly


Unrelated tiny fixes along the way:
- Clarified `--keep-existing` option docs
- Ensured list return type in `_last_lookup()`
2025-08-24 08:26:05 +01:00
J0J0 Todos
0dcf7fdc23 lastgenre: Remove leftover/unused REPLACE constant 2025-08-24 09:20:36 +02:00
J0J0 Todos
efa968175b Changelog for #5946 2025-08-24 09:20:36 +02:00
J0J0 Todos
a1efd2836a lastgenre: Clarify keep-existing precedence in docs 2025-08-24 09:20:36 +02:00
J0J0 Todos
05a1a95ee9 lastgenre: Dedup combine/resolve/label/format code 2025-08-24 09:20:36 +02:00
J0J0 Todos
d8e90d8e54 lastgenre: Resolve combined genres in each stage
To ensure proper fallback to the next stage, in each stage we do a full
combine/resolve/log.

Also we directly return if have satisfied results. As a bonus this
improves readability.

Some duplicate code on the label magic though...
2025-08-24 09:20:36 +02:00
J0J0 Todos
f85ba7ab3b lastgenre: Fix test_get_genre loading whitelist
- The default whitelist files were not loaded properly (at least in
  local test environments, not sure about CI yet...anyway...)
2025-08-24 09:20:36 +02:00
J0J0 Todos
fa8b5d7495 lastgenre: Fix canonicalization of non-valid genres
- Remove "early whitelist check", since it breaks canonicalization of
  actually unwanted genres (not whitelisted) resolving "up" to parent
  genres.
- Remove the filter_valid_genres method entirely and get back to inline
  list comprehensions. The caveat is that None genres are not catched
  that way (see below, should be one of the last functions that finally
  returns lists only)
- Along the way, fix _last_lookup's rearly return to empty list instead
  of None.
2025-08-24 09:20:36 +02:00
J0J0 Todos
7f7b900f1b lastgenre: Test canonicalization
- Test non-whitelisted genres resolving "up" in the tree.
- Test whitelisted original and whitelisted new genre resolving "up"
- Test non-whitelisted original genre resolving "up" (and deduplication
  works)
2025-08-24 09:20:36 +02:00
David Logie
d87b80bd51 Log loaded plugins at the debug level. 2025-08-23 13:11:58 +01:00
Sebastian Mohr
3c5d7ed343
Get started: Add instructions for Void Linux (#5921)
## Description

Add instructions to install beets on Void Linux to the get started
section.
2025-08-22 11:42:17 +02:00
Sebastian Mohr
5c7d49e24e Quick docfmt. 2025-08-22 11:30:47 +02:00
Hendrik Boll
6dfde732b0 readme: add void linux 2025-08-22 11:29:35 +02:00
Šarūnas Nejus
b7091bf120
Convert flexible field values to SQL before storing them (#5833)
## Description

This is required to support list values in flexible fields.
See #5698 for more details.
2025-08-19 13:44:27 +01:00
Šarūnas Nejus
c0675fefb8
Merge branch 'master' into multivalued-flexible-fields 2025-08-19 13:39:34 +01:00
Šarūnas Nejus
fcc9341360
Tighten up docs CI checks (#5913)
This PR adds `sphinx-lint` check for docs which catches issues like line
length.
2025-08-11 17:04:49 +01:00
Rebecca Turner
1786adfff1 chroma: set a default timeout of 10 seconds
TODO: Configurable timeouts :)
2025-08-10 23:14:20 -07:00
Šarūnas Nejus
cff56fbc08
Add docs adjustments to git blame ignore revs 2025-08-10 16:25:35 +01:00
Šarūnas Nejus
2447d000bc
Include a note about docs formatting/linting to CONTRIBUTING.rst 2025-08-10 16:25:05 +01:00
Šarūnas Nejus
13080c17a3
Update release conversion logic accordingly 2025-08-10 16:25:05 +01:00
Šarūnas Nejus
ab5acaabb3
Reformat all docs using docstrfmt 2025-08-10 16:25:05 +01:00
Šarūnas Nejus
1129170ddc
Configure docstrfmt 2025-08-10 16:25:04 +01:00
Šarūnas Nejus
769dcdc88a
Docs: fix linting issues 2025-08-10 16:16:02 +01:00
Šarūnas Nejus
c2043dad7f
Reorganize problem matchers 2025-08-10 14:05:56 +01:00
Šarūnas Nejus
61755ada9b
CI: cancel previous workflow runs when new commit is pushed 2025-08-10 14:05:56 +01:00
Šarūnas Nejus
15b0c052b6
Add sphinx-lint and run it in CI 2025-08-10 14:04:42 +01:00
Šarūnas Nejus
52cf74125e
Simplify plugin loading (#5887)
This PR centralises plugin loading logic inside `beets.plugins` module.


- Removed intermediatery `_classes` variable by initialising plugins
immediately.
- Simplified listeners registration by defining listener variables in
the base
`BeetsPlugin` class, and making the `register_listener` method a
`@classmethod`.
- Simplified plugin test setup accordingly.
2025-08-10 13:46:53 +01:00
Šarūnas Nejus
2059a3a802
Move EventType definition to plugins.py and fix test_hook types 2025-08-09 15:44:35 +01:00
Šarūnas Nejus
84df87c665
Upload test results to codecov 2025-08-09 15:27:17 +01:00
Šarūnas Nejus
24ae1a765b
Make cov setup a bit more useful and upgrade cov upload action 2025-08-09 15:11:59 +01:00
Šarūnas Nejus
54b31d01e9
Use only plugins/disabled_plugins config in plugin loading 2025-08-09 15:11:58 +01:00
Šarūnas Nejus
e9feb41709
Refactor plugin registration tests 2025-08-09 15:06:07 +01:00
Šarūnas Nejus
52bdb58a46
Simplify plugin loading mechanism
Centralise plugin loading in `beets.plugins` and refactor the plugin
loading system to be more straightforward and eliminate complex mocking
in tests. Replace the two-stage class collection and instantiation
process with direct instance creation and storage.

Add plugins.PluginImportError and adjust plugin import tests to only
complain about plugin import issues.
2025-08-09 15:06:06 +01:00
Šarūnas Nejus
788e31b619
Slightly simplify listener registration 2025-08-09 15:04:01 +01:00
Sebastian Mohr
c2d1bc3aaf
Add py.typed marker file to support PEP 561 typing (#5906)
Add `py.typed` marker file to support PEP 561 typing

This PR adds a `py.typed` marker file to the package directory to
indicate that the package includes inline type hints and is PEP 561
compliant.
2025-08-09 13:31:55 +02:00
Šarūnas Nejus
78c361154f
Added a load all plugins test. (#5878)
Adds a test that loads all available plugins in the beetsplug namespace.
This came up during #5876.
2025-08-09 12:21:53 +01:00
Sebastian Mohr
3f23f35353 Removed duplicate importlib import. 2025-08-09 13:17:27 +02:00
Sebastian Mohr
84ae11657e Added a check for gstream plugin issues on windows. 2025-08-09 13:17:27 +02:00
Sebastian Mohr
73dda4f7f8 Added dependencies for all failed plugins 2025-08-09 13:17:27 +02:00
Sebastian Mohr
6c3f93df2c Replaced find_executable with shutil.which for python 3.12
compatibility as distutils was deprecated.
2025-08-09 13:17:27 +02:00
Sebastian Mohr
1696789cbe Removed re and added brackets 2025-08-09 13:17:27 +02:00
Sebastian Mohr
a2136e1100 Removed now unused _is_spec_avilable function 2025-08-09 13:17:27 +02:00