mirror of
https://github.com/beetbox/beets.git
synced 2026-01-13 03:34:31 +01:00
A couple of explanatory comments for #1292
This commit is contained in:
parent
82e89b8960
commit
a7878b0eba
1 changed files with 5 additions and 0 deletions
|
|
@ -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):
|
||||
|
|
|
|||
Loading…
Reference in a new issue