mirror of
https://github.com/beetbox/beets.git
synced 2025-12-13 03:52:24 +01:00
Update library after changing item paths
This commit is contained in:
parent
a4b5297f4f
commit
d78c99e7a1
1 changed files with 5 additions and 6 deletions
|
|
@ -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)
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue