mirror of
https://github.com/beetbox/beets.git
synced 2025-12-15 04:55:10 +01:00
Remove unnecessary database queries during reimport.
This commit is contained in:
parent
c6a08a08a5
commit
6eb4afb35f
1 changed files with 1 additions and 5 deletions
|
|
@ -674,11 +674,7 @@ class ImportTask(object):
|
|||
path as an item from this task.
|
||||
"""
|
||||
for item in self.imported_items():
|
||||
dup_items = list(lib.items(
|
||||
dbcore.query.BytesQuery('path', item.path)
|
||||
))
|
||||
self.replaced_items[item] = dup_items
|
||||
for dup_item in dup_items:
|
||||
for dup_item in self.replaced_items[item]:
|
||||
log.debug('replacing item %i: %s' %
|
||||
(dup_item.id, displayable_path(item.path)))
|
||||
dup_item.remove()
|
||||
|
|
|
|||
Loading…
Reference in a new issue