1. Adrian Sampson
  2. beets

Commits

Adrian Sampson  committed a5e6430

"pluginpath" config value

  • Participants
  • Parent commits 79722a8
  • Branches default
  • Tags 1.0b3

Comments (0)

Files changed (2)

File NEWS

View file
   beets command-line interface. The "bpd" and "dadd" commands were
   removed from the beets core and turned into plugins; BPD is loaded
   by default. To load the non-default plugins, use the "plugins" config
-  value (a space-separated list of plugin names). Plugins are just
-  Python modules under the "beetsplug" namespace package containing
-  subclasses of beets.plugins.BeetsPlugin. See the "beetsplug" directory
-  for examples.
+  value (a space-separated list of plugin names). You can also set the
+  "pluginpath" config option to a colon-separated list of directories
+  to search for plugins. Plugins are just Python modules under the
+  "beetsplug" namespace package containing subclasses of
+  beets.plugins.BeetsPlugin. See the "beetsplug" directory for examples.
 * Support for MusicBrainz ID tags. The autotagger now keeps track of the
   MusicBrainz track, album, and artist IDs it matched for each file. It
   also looks for album IDs in new files it's importing and uses those to

File beets/ui/__init__.py

View file
 import optparse
 import textwrap
 import ConfigParser
+import sys
 
 from beets import library
 from beets import plugins
     config = ConfigParser.SafeConfigParser()
     config.read(CONFIG_FILE)
 
+    # Add plugin paths.
+    plugpaths = config_val(config, 'beets', 'pluginpath', '')
+    for plugpath in plugpaths.split(':'):
+        sys.path.append(os.path.expanduser(plugpath))
     # Load requested plugins.
     plugnames = config_val(config, 'beets', 'plugins', '')
     plugins.load_plugins(plugnames.split())