mirror of
https://github.com/beetbox/beets.git
synced 2025-12-06 16:42:42 +01:00
Do not show a warning to users that have musicbrainz disabled
This commit is contained in:
parent
3bb068a675
commit
b643fc4ce5
2 changed files with 12 additions and 10 deletions
|
|
@ -7,6 +7,7 @@ statefile: state.pickle
|
||||||
# --------------- Plugins ---------------
|
# --------------- Plugins ---------------
|
||||||
|
|
||||||
plugins: []
|
plugins: []
|
||||||
|
disabled_plugins: []
|
||||||
|
|
||||||
pluginpath: []
|
pluginpath: []
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -414,23 +414,24 @@ def get_plugin_names() -> list[str]:
|
||||||
# *contain* a `beetsplug` package.
|
# *contain* a `beetsplug` package.
|
||||||
sys.path += paths
|
sys.path += paths
|
||||||
plugins = unique_list(beets.config["plugins"].as_str_seq())
|
plugins = unique_list(beets.config["plugins"].as_str_seq())
|
||||||
|
beets.config.add({"disabled_plugins": []})
|
||||||
|
disabled_plugins = set(beets.config["disabled_plugins"].as_str_seq())
|
||||||
# TODO: Remove in v3.0.0
|
# TODO: Remove in v3.0.0
|
||||||
if "musicbrainz" not in plugins:
|
if "musicbrainz" not in plugins and "musicbrainz" not in disabled_plugins:
|
||||||
deprecate_for_user(
|
deprecate_for_user(
|
||||||
log,
|
log,
|
||||||
"Automatic loading of 'musicbrainz' plugin",
|
"Automatic loading of 'musicbrainz' plugin",
|
||||||
"'plugins' configuration to explicitly add 'musicbrainz'",
|
"'plugins' configuration to explicitly add 'musicbrainz'",
|
||||||
)
|
)
|
||||||
|
|
||||||
enabled = beets.config["musicbrainz"].flatten().get("enabled")
|
enabled = beets.config["musicbrainz"].flatten().get("enabled")
|
||||||
if enabled is not None:
|
if enabled is not None:
|
||||||
deprecate_for_user(
|
deprecate_for_user(log, "'musicbrainz.enabled' configuration option")
|
||||||
log, "'musicbrainz.enabled' configuration option"
|
if enabled is False:
|
||||||
)
|
disabled_plugins.add("musicbrainz")
|
||||||
if enabled is not False:
|
else:
|
||||||
plugins.append("musicbrainz")
|
plugins.append("musicbrainz")
|
||||||
|
|
||||||
beets.config.add({"disabled_plugins": []})
|
|
||||||
disabled_plugins = set(beets.config["disabled_plugins"].as_str_seq())
|
|
||||||
return [p for p in plugins if p not in disabled_plugins]
|
return [p for p in plugins if p not in disabled_plugins]
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue