mirror of
https://github.com/beetbox/beets.git
synced 2026-07-16 10:37:00 -04:00
Merge pull request #90 from dangmai/pluginchain
Allow plugins to execute in predictable order
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -49,3 +49,7 @@ from the command line::
|
||||
$ beet splupdate
|
||||
|
||||
which will generate your new smart playlists.
|
||||
|
||||
You can also use this plugin together with the :doc:`mpdupdate`, in order to
|
||||
automatically notify `mpd` of the playlist change, by adding `mpdupdate` to the
|
||||
`plugin` section in your config file **after** the `smartplaylist` plugin.
|
||||
|
||||
Reference in New Issue
Block a user