From ea3a7ea45de48c3a37a2dc7f84eae2d80cb266b6 Mon Sep 17 00:00:00 2001 From: Dang Mai Date: Sun, 3 Feb 2013 10:00:44 -0500 Subject: [PATCH 1/2] 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. --- beets/plugins.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/beets/plugins.py b/beets/plugins.py index b3109a690..fbc863227 100755 --- a/beets/plugins.py +++ b/beets/plugins.py @@ -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) From 24bc0847243aa252049274900b60845107e57b11 Mon Sep 17 00:00:00 2001 From: Dang Mai Date: Sun, 3 Feb 2013 10:10:29 -0500 Subject: [PATCH 2/2] Add small docs for smartplaylist about chaining --- docs/plugins/smartplaylist.rst | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/plugins/smartplaylist.rst b/docs/plugins/smartplaylist.rst index 6910f3f34..0fe97e26e 100644 --- a/docs/plugins/smartplaylist.rst +++ b/docs/plugins/smartplaylist.rst @@ -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.