A couple of explanatory comments for #1292

This commit is contained in:
Adrian Sampson 2015-02-03 09:50:36 -08:00
parent 82e89b8960
commit a7878b0eba

View file

@ -50,10 +50,15 @@ class FileFilterPlugin(BeetsPlugin):
if len(items_to_import) > 0:
task.items = items_to_import
else:
# Returning an empty list of tasks from the handler
# drops the task from the rest of the importer pipeline.
return []
elif isinstance(task, SingletonImportTask):
if not self.file_filter(task.item['path']):
return []
# If not filtered, return the original task unchanged.
return [task]
def file_filter(self, full_path):