mirror of
https://github.com/beetbox/beets.git
synced 2026-02-09 00:41:57 +01:00
new plugin event: library_opened
This commit is contained in:
parent
c9da7bf3f8
commit
dfcd47942d
3 changed files with 6 additions and 0 deletions
|
|
@ -731,6 +731,7 @@ def main(args=None, configfh=None):
|
|||
replacements)
|
||||
except sqlite3.OperationalError:
|
||||
raise UserError("database file %s could not be opened" % db_path)
|
||||
plugins.send("library_opened", lib=lib)
|
||||
|
||||
# Configure the logger.
|
||||
log = logging.getLogger('beets')
|
||||
|
|
|
|||
|
|
@ -6,6 +6,8 @@ Changelog
|
|||
|
||||
* New plugin event: ``import_task_choice`` is called after an import task has an
|
||||
action assigned.
|
||||
* New plugin event: ``library_opened`` is called when beets starts up and
|
||||
opens the library database.
|
||||
|
||||
1.0b14 (May 12, 2012)
|
||||
---------------------
|
||||
|
|
|
|||
|
|
@ -142,6 +142,9 @@ currently available are:
|
|||
Use ``task.choice_flag`` to determine the action to be taken. Parameters:
|
||||
``task`` and ``config``.
|
||||
|
||||
* *library_opened*: called after beets starts up and initializes the main
|
||||
Library object. Parameter: ``lib``.
|
||||
|
||||
The included ``mpdupdate`` plugin provides an example use case for event listeners.
|
||||
|
||||
Extend the Autotagger
|
||||
|
|
|
|||
Loading…
Reference in a new issue