From f582e045e9a5ff987e1265082a3abd3dad86358e Mon Sep 17 00:00:00 2001 From: Adrian Sampson Date: Fri, 1 Jan 2016 13:05:07 -0800 Subject: [PATCH] Add a comment for #1584 --- beets/ui/commands.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/beets/ui/commands.py b/beets/ui/commands.py index 4b756b5c8..25ed0425d 100644 --- a/beets/ui/commands.py +++ b/beets/ui/commands.py @@ -1427,6 +1427,8 @@ def move_items(lib, dest, query, copy, album, pretend): """ items, albums = _do_query(lib, query, album, False) objs = albums if album else items + + # Filter out files that don't need to be moved. isitemmoved = lambda item: item.path != item.destination(basedir=dest) isalbummoved = lambda album: any(isitemmoved(i) for i in album.items()) objs = [o for o in objs if (isalbummoved if album else isitemmoved)(o)] @@ -1435,8 +1437,9 @@ def move_items(lib, dest, query, copy, album, pretend): entity = 'album' if album else 'item' log.info(u'{0} {1} {2}{3}.', action, len(objs), entity, 's' if len(objs) != 1 else '') - if len(objs) == 0: + if not objs: return + if pretend: if album: show_path_changes([(item.path, item.destination(basedir=dest))