diff --git a/beets/importer.py b/beets/importer.py index 0eaa34cf4..d67df17b2 100644 --- a/beets/importer.py +++ b/beets/importer.py @@ -779,6 +779,9 @@ def manipulate_files(config): for item in items: config.lib.store(item) + # Plugin event. + plugins.send('import_task_files', config=config, task=task) + def fetch_art(config): """A coroutine that fetches and applies album art for albums where appropriate. diff --git a/docs/changelog.rst b/docs/changelog.rst index 0b6da3cce..b1f26840f 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -30,6 +30,8 @@ Changelog `$genre` would use the old genre instead of the newly discovered one. * New plugin event: ``import_task_choice`` is called after an import task has an action assigned. +* New plugin event: `import_task_files` is called after a task's file + manipulation has finished (copying or moving files, writing metadata tags). * New plugin event: ``library_opened`` is called when beets starts up and opens the library database. * Fix a crash when moving files to a Samba share. diff --git a/docs/plugins/writing.rst b/docs/plugins/writing.rst index db968f321..2947bb4d2 100644 --- a/docs/plugins/writing.rst +++ b/docs/plugins/writing.rst @@ -142,6 +142,10 @@ currently available are: Use ``task.choice_flag`` to determine the action to be taken. Parameters: ``task`` and ``config``. +* *import_task_files*: called after an import task finishes manipulating the + filesystem (copying and moving files, writing metadata tags). Parameters: + ``task`` and ``config``. + * *library_opened*: called after beets starts up and initializes the main Library object. Parameter: ``lib``.