mirror of
https://github.com/beetbox/beets.git
synced 2026-01-18 22:22:18 +01:00
commit
7c670711ae
3 changed files with 12 additions and 0 deletions
|
|
@ -1128,6 +1128,11 @@ def _load_plugins(options, config):
|
|||
else:
|
||||
plugin_list = config['plugins'].as_str_seq()
|
||||
|
||||
# Exclude any plugins that were specified on the command line
|
||||
if options.exclude is not None:
|
||||
plugin_list = [p for p in plugin_list
|
||||
if p not in options.exclude.split(',')]
|
||||
|
||||
plugins.load_plugins(plugin_list)
|
||||
return plugins
|
||||
|
||||
|
|
@ -1261,6 +1266,8 @@ def _raw_main(args, lib=None):
|
|||
help='path to configuration file')
|
||||
parser.add_option('-p', '--plugins', dest='plugins',
|
||||
help='a comma-separated list of plugins to load')
|
||||
parser.add_option('-P', '--disable-plugins', dest='exclude',
|
||||
help='a comma-separated list of plugins to disable')
|
||||
parser.add_option('-h', '--help', dest='help', action='store_true',
|
||||
help='show this help message and exit')
|
||||
parser.add_option('--version', dest='version', action='store_true',
|
||||
|
|
|
|||
|
|
@ -20,6 +20,8 @@ New features:
|
|||
* :doc:`/plugins/convert`: Add a new `auto_keep` option that automatically
|
||||
converts files but keeps the *originals* in the library.
|
||||
:bug:`1840` :bug:`4302`
|
||||
* Added a ``-P`` (or ``--disable-plugins``) flag to specify one/multiple plugin(s) to be
|
||||
disabled at startup.
|
||||
|
||||
Bug fixes:
|
||||
|
||||
|
|
|
|||
|
|
@ -445,6 +445,9 @@ import ...``.
|
|||
specified, the plugin list in your configuration is ignored. The long form
|
||||
of this argument also allows specifying no plugins, effectively disabling
|
||||
all plugins: ``--plugins=``.
|
||||
* ``-P plugins``: specify a comma-separated list of plugins to disable in a
|
||||
specific beets run. This will overwrite ``-p`` if used with it. To disable all plugins, use
|
||||
``--plugins=`` instead.
|
||||
|
||||
Beets also uses the ``BEETSDIR`` environment variable to look for
|
||||
configuration and data.
|
||||
|
|
|
|||
Loading…
Reference in a new issue