Add a comment for #1584

This commit is contained in:
Adrian Sampson 2016-01-01 13:05:07 -08:00
parent 884d972176
commit f582e045e9

View file

@ -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))