diff --git a/beets/importer.py b/beets/importer.py index dd1537213..4fd4749ee 100644 --- a/beets/importer.py +++ b/beets/importer.py @@ -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 diff --git a/docs/changelog.rst b/docs/changelog.rst index 539c5b6a7..ed7c88f08 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -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)