mirror of
https://github.com/beetbox/beets.git
synced 2026-01-09 09:22:55 +01:00
Don't open library if we got it from the test suite
This commit is contained in:
parent
893a563e26
commit
b42880907e
1 changed files with 6 additions and 4 deletions
|
|
@ -939,10 +939,12 @@ def beet(ctx, **options):
|
|||
# Configure the MusicBrainz API.
|
||||
mb.configure()
|
||||
|
||||
# Open the library database and set it on the context.
|
||||
lib = _open_library(config)
|
||||
plugins.send('library_opened', lib=lib)
|
||||
beets_ctx.lib = lib
|
||||
# Open the library database and set it on the context
|
||||
# if we didn't already get it from the test suite.
|
||||
if not beets_ctx.lib:
|
||||
beets_ctx.lib = _open_library(config)
|
||||
|
||||
plugins.send('library_opened', lib=beets_ctx.lib)
|
||||
|
||||
# Load field types from the plugins.
|
||||
library.Item._types.update(plugins.types(library.Item))
|
||||
|
|
|
|||
Loading…
Reference in a new issue