Fix #796: flat import of empty directories

This commit is contained in:
Adrian Sampson 2014-06-01 12:04:16 -07:00
parent 632d3a9612
commit 61083325e3
2 changed files with 4 additions and 2 deletions

View file

@ -839,8 +839,9 @@ def read_tasks(session):
all_items = []
for _, items in autotag.albums_in_dir(toppath):
all_items += items
yield ImportTask(toppath, [toppath], all_items)
yield SentinelImportTask(toppath)
if all_items:
yield ImportTask(toppath, [toppath], all_items)
yield SentinelImportTask(toppath)
continue
resume_dir = None

View file

@ -30,6 +30,7 @@ Little improvements and fixes:
* :doc:`/plugins/play`: Playing albums now generates filenames by default (as
opposed to directories) for better compatibility. The ``use_folders`` option
restores the old behavior. Thanks to Lucas Duailibe.
* Fix an error when importing an empty directory with the ``--flat`` option.
1.3.6 (May 10, 2014)