diff --git a/beets/importer.py b/beets/importer.py index 713bcd52f4..844b660863 100644 --- a/beets/importer.py +++ b/beets/importer.py @@ -1408,7 +1408,8 @@ def group(item): if task.skip: continue tasks = [] - for _, items in itertools.groupby(task.items, group): + sorted_items = sorted(task.items, key=group) + for _, items in itertools.groupby(sorted_items, group): items = list(items) task = ImportTask(task.toppath, [i.path for i in items], items) diff --git a/docs/changelog.rst b/docs/changelog.rst index 057440a54b..e9e57d9e08 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -77,6 +77,8 @@ Fixes: on the user's path by default). * Fix an incompatibility with certain JPEG files. Here's a relevant `Python bug`_. Thanks to :user:`nathdwek`. :bug:`1545` +* Fix the 'Group albums' feature so it can handle when files aren't already + in order by album. :bug:`1550` .. _Python bug: http://bugs.python.org/issue16512