mirror of
https://github.com/beetbox/beets.git
synced 2025-12-14 12:35:19 +01:00
Simplified the flattening for the lists returned by plugins on the import_task_created event.
This commit is contained in:
parent
e681449785
commit
11b446e7df
1 changed files with 2 additions and 5 deletions
|
|
@ -556,11 +556,8 @@ class ImportTask(object):
|
|||
if not tasks:
|
||||
tasks = [self]
|
||||
else:
|
||||
# The plugins gave us a list of lists of task. Flatten it.
|
||||
flat_tasks = []
|
||||
for inner in tasks:
|
||||
flat_tasks += inner
|
||||
tasks = [t for t in flat_tasks if t]
|
||||
# The plugins gave us a list of lists of tasks. Flatten it.
|
||||
tasks = [t for inner in tasks for t in inner]
|
||||
return tasks
|
||||
|
||||
def lookup_candidates(self):
|
||||
|
|
|
|||
Loading…
Reference in a new issue