mirror of
https://github.com/beetbox/beets.git
synced 2026-01-13 11:41:43 +01:00
Add a comment for #1584
This commit is contained in:
parent
884d972176
commit
f582e045e9
1 changed files with 4 additions and 1 deletions
|
|
@ -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))
|
||||
|
|
|
|||
Loading…
Reference in a new issue