From 1b3e7d93104b7eb8f4bd30e98999bdff5f923601 Mon Sep 17 00:00:00 2001 From: Adrian Sampson Date: Sun, 17 Apr 2011 13:35:00 -0700 Subject: [PATCH] fix singleton invocation of pipeline --- beets/importer.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/beets/importer.py b/beets/importer.py index 0eaa0762a..28ae145d7 100644 --- a/beets/importer.py +++ b/beets/importer.py @@ -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)