show plugins in "version" output (#153)

This commit is contained in:
Adrian Sampson 2011-04-01 20:42:24 -07:00
parent b993e8bc12
commit 6b49bb11ae
2 changed files with 10 additions and 0 deletions

1
NEWS
View file

@ -37,6 +37,7 @@
* A new "import_quiet_fallback" option specifies what should happen in * A new "import_quiet_fallback" option specifies what should happen in
quiet mode when there is no strong recommendation. The options are quiet mode when there is no strong recommendation. The options are
"skip" (the default) and "asis". "skip" (the default) and "asis".
* The "version" command now lists all the loaded plugins.
* Fix a bug where some files would be erroneously interpreted as MP4. * Fix a bug where some files would be erroneously interpreted as MP4.
* Fix permission bits applied to album art files. * Fix permission bits applied to album art files.
* Fix malformed MusicBrainz queries caused by null characters. * Fix malformed MusicBrainz queries caused by null characters.

View file

@ -804,6 +804,15 @@ default_commands.append(stats_cmd)
def show_version(lib, config, opts, args): def show_version(lib, config, opts, args):
print 'beets version %s' % beets.__version__ print 'beets version %s' % beets.__version__
# Show plugins.
names = []
for plugin in plugins.find_plugins():
modname = plugin.__module__
names.append(modname.split('.')[-1])
if names:
print 'plugins:', ', '.join(names)
else:
print 'no plugins loaded'
version_cmd = ui.Subcommand('version', version_cmd = ui.Subcommand('version',
help='output version information') help='output version information')
version_cmd.func = show_version version_cmd.func = show_version