From d78c99e7a1f4227f60118f46c68b76e79e0d68ae Mon Sep 17 00:00:00 2001 From: Thomas Scholtes Date: Sat, 19 Apr 2014 17:13:05 +0200 Subject: [PATCH] Update library after changing item paths --- beets/importer.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/beets/importer.py b/beets/importer.py index f6bdf5209..dc41278fc 100644 --- a/beets/importer.py +++ b/beets/importer.py @@ -383,7 +383,7 @@ class ImportTask(object): lib.directory) def finalize(self, session): - """Save items to library, save progress and emit plugin event. + """Save progress clean up files, and emit plugin event. """ # FIXME the session argument is unfortunate. It should be # present as an attribute of the task. @@ -394,11 +394,6 @@ class ImportTask(object): if config['import']['incremental']: self.save_history() - if not self.skip: - with session.lib.transaction(): - for item in self.imported_items(): - item.store() - self.cleanup() self._emit_imported(session) @@ -538,6 +533,10 @@ class ImportTask(object): if config['import']['write'] and self.apply: item.try_write() + with session.lib.transaction(): + for item in self.imported_items(): + item.store() + plugins.send('import_task_files', session=session, task=self)