mirror of
https://github.com/beetbox/beets.git
synced 2026-02-10 17:34:05 +01:00
fix singleton invocation of pipeline
This commit is contained in:
parent
3a5f9ecb38
commit
1b3e7d9310
1 changed files with 4 additions and 1 deletions
|
|
@ -356,11 +356,14 @@ def user_query(config):
|
|||
if choice is action.TRACKS:
|
||||
# Set up a little pipeline for dealing with the singletons.
|
||||
item_tasks = []
|
||||
def emitter():
|
||||
for item in task.items:
|
||||
yield ImportTask.item_task(item)
|
||||
def collector():
|
||||
while True:
|
||||
item_task = yield
|
||||
item_tasks.append(item_task)
|
||||
ipl = pipeline.Pipeline((iter(task.items), item_lookup(config),
|
||||
ipl = pipeline.Pipeline((emitter(), item_lookup(config),
|
||||
item_query(config), collector()))
|
||||
ipl.run_sequential()
|
||||
task = pipeline.multiple(item_tasks)
|
||||
|
|
|
|||
Loading…
Reference in a new issue