mirror of
https://github.com/beetbox/beets.git
synced 2025-12-14 12:35:19 +01:00
Run plugins in predictable order
In the config file, if 2 plugins listen to the same event, make sure the one that is listed first is executed earlier.
This commit is contained in:
parent
4f7e738f82
commit
ea3a7ea45d
1 changed files with 2 additions and 2 deletions
|
|
@ -155,7 +155,7 @@ class BeetsPlugin(object):
|
|||
return func
|
||||
return helper
|
||||
|
||||
_classes = set()
|
||||
_classes = []
|
||||
def load_plugins(names=()):
|
||||
"""Imports the modules for a sequence of plugin names. Each name
|
||||
must be the name of a Python module under the "beetsplug" namespace
|
||||
|
|
@ -177,7 +177,7 @@ def load_plugins(names=()):
|
|||
for obj in getattr(namespace, name).__dict__.values():
|
||||
if isinstance(obj, type) and issubclass(obj, BeetsPlugin) \
|
||||
and obj != BeetsPlugin:
|
||||
_classes.add(obj)
|
||||
_classes.append(obj)
|
||||
|
||||
except:
|
||||
log.warn('** error loading plugin %s' % name)
|
||||
|
|
|
|||
Loading…
Reference in a new issue