mirror of
https://github.com/beetbox/beets.git
synced 2026-02-13 02:42:38 +01:00
Fix replaced items in importer
Previously, `task.replaced_items[item]` was a `Result` instance. This meant that iterating over these, in the plugin stage for example, would fetch them from the database. But by then the items had been replaced with the imported versions. Now we instantiate the list of replaced items so that we always get the same, old ones.
This commit is contained in:
parent
b8143d2561
commit
de08059da4
1 changed files with 1 additions and 1 deletions
|
|
@ -549,7 +549,7 @@ class ImportTask(object):
|
|||
self.replaced_items = defaultdict(list)
|
||||
for item in self.imported_items():
|
||||
dup_items = lib.items(dbcore.query.BytesQuery('path', item.path))
|
||||
self.replaced_items[item] = dup_items
|
||||
self.replaced_items[item] = list(dup_items)
|
||||
for dup_item in dup_items:
|
||||
log.debug('replacing item %i: %s' %
|
||||
(dup_item.id, displayable_path(item.path)))
|
||||
|
|
|
|||
Loading…
Reference in a new issue