Support for inbox-level settings and Aisauce#262
Open
pSpitzner wants to merge 5 commits intorelease/2.0.0from
Open
Support for inbox-level settings and Aisauce#262pSpitzner wants to merge 5 commits intorelease/2.0.0from
pSpitzner wants to merge 5 commits intorelease/2.0.0from
Conversation
Owner
pSpitzner
commented
Jan 9, 2026
- Adds aisauce plugin as a default dependency.
- Adds basic support to configure settings on a per-inbox level. This has great potential to wreak havoc, causing inconsistent libraries if the wrong settings are altered. The focus are plugins. To avoid user errors, config parts that can be altered have to be manually coded into the schema.
|
Thank you for the PR! The changelog has not been updated, so here is a friendly reminder to check if you need to add an entry. |
Owner
Author
|
Locally Next steps:
|
pSpitzner
commented
Jan 25, 2026
| aisauce: PluginAiSauceSchema = field(default_factory=lambda: PluginAiSauceSchema()) | ||
| # Note: we currently set the defaults from the schema in commit_to_beets. | ||
| # This prevents us from using None as default value in beets root-level entries. | ||
| # For instance `aisauce: PluginAiSauceSchema | None = None` wont work, we need |
Owner
Author
There was a problem hiding this comment.
Reconsidering, I think we need to solve this, otherwise we will regret it later.
If we do not find a way to allow using None as the default value for a plugin section at root level (meaning "I dont care about it in the global settings"), we will not be able to allow overrides later while also having the typing.
Edit: with latest eyconf we can now pass Nones, and get through our own validation steps, so thats good.
However, problem remains in beets plugin loading logic:
beets-flask-dev | File "/repo/backend/beets_flask/config/beets_config.py", line 132, in commit_to_beets
beets-flask-dev | load_plugins()
beets-flask-dev | File "/repo/backend/.venv/lib/python3.12/site-packages/beets/plugins.py", line 488, in load_plugins
beets-flask-dev | send("pluginload")
beets-flask-dev | File "/repo/backend/.venv/lib/python3.12/site-packages/beets/plugins.py", line 648, in send
beets-flask-dev | if (r := handler(**arguments)) is not None
beets-flask-dev | ^^^^^^^^^^^^^^^^^^^^
beets-flask-dev | File "/repo/backend/.venv/lib/python3.12/site-packages/beets/plugins.py", line 329, in wrapper
beets-flask-dev | return func(*args, **kwargs)
beets-flask-dev | ^^^^^^^^^^^^^^^^^^^^^
beets-flask-dev | File "/repo/backend/.venv/lib/python3.12/site-packages/beets/plugins.py", line 255, in _verify_config
beets-flask-dev | or "source_weight" not in self.config
beets-flask-dev | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
beets-flask-dev | File "/repo/backend/.venv/lib/python3.12/site-packages/confuse/core.py", line 148, in __contains__
beets-flask-dev | return self[key].exists()
beets-flask-dev | ^^^^^^^^^^^^^^^^^^
beets-flask-dev | File "/repo/backend/.venv/lib/python3.12/site-packages/confuse/core.py", line 87, in exists
beets-flask-dev | self.first()
beets-flask-dev | File "/repo/backend/.venv/lib/python3.12/site-packages/confuse/core.py", line 79, in first
beets-flask-dev | return util.iter_first(pairs)
beets-flask-dev | ^^^^^^^^^^^^^^^^^^^^^^
beets-flask-dev | File "/repo/backend/.venv/lib/python3.12/site-packages/confuse/util.py", line 21, in iter_first
beets-flask-dev | return next(it)
beets-flask-dev | ^^^^^^^^
beets-flask-dev | File "/repo/backend/.venv/lib/python3.12/site-packages/confuse/core.py", line 459, in resolve
beets-flask-dev | raise ConfigTypeError(
beets-flask-dev | confuse.exceptions.ConfigTypeError: aisauce must be a collection, not NoneType
Options:
- Try to set the section in beets config to
{}instead of None, but might need deep nesting, and will likely not solve the issue, once plugins realize a key is missing (like aisauces providers) - pop None sections before putting them into beets. ugly but sensible.
Added config validation for unique paths in configured inbox folders.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.