mirror of
https://github.com/beetbox/beets.git
synced 2026-01-30 20:13:37 +01:00
Use py3_path for plugin search paths (from #2096)
This commit is contained in:
parent
ec08272a06
commit
f65cf62c80
1 changed files with 7 additions and 1 deletions
|
|
@ -1109,9 +1109,15 @@ def _load_plugins(config):
|
|||
paths = [util.normpath(p) for p in paths]
|
||||
log.debug(u'plugin paths: {0}', util.displayable_path(paths))
|
||||
|
||||
# On Python 3, the search paths need to be unicode.
|
||||
paths = [util.py3_path(p) for p in paths]
|
||||
|
||||
# Extend the `beetsplug` package to include the plugin paths.
|
||||
import beetsplug
|
||||
beetsplug.__path__ = paths + beetsplug.__path__
|
||||
# For backwards compatibility.
|
||||
|
||||
# For backwards compatibility, also support plugin paths that
|
||||
# *contain* a `beetsplug` package.
|
||||
sys.path += paths
|
||||
|
||||
plugins.load_plugins(config['plugins'].as_str_seq())
|
||||
|
|
|
|||
Loading…
Reference in a new issue