mirror of
https://github.com/beetbox/beets.git
synced 2025-12-29 20:12:33 +01:00
Better readability
This commit is contained in:
parent
5e6b8f5264
commit
ea03c7fac2
2 changed files with 9 additions and 9 deletions
|
|
@ -1651,14 +1651,15 @@ class DefaultTemplateFunctions(object):
|
|||
def apply_item_changes(lib, item, move, pretend, write):
|
||||
"""Store, move and write the item according to the arguments.
|
||||
"""
|
||||
if not pretend:
|
||||
# Move the item if it's in the library.
|
||||
if move and lib.directory in util.ancestry(item.path):
|
||||
item.move(with_album=False)
|
||||
if pretend:
|
||||
return
|
||||
# Move the item if it's in the library.
|
||||
if move and lib.directory in util.ancestry(item.path):
|
||||
item.move(with_album=False)
|
||||
|
||||
if write:
|
||||
item.try_write()
|
||||
item.store()
|
||||
if write:
|
||||
item.try_write()
|
||||
item.store()
|
||||
|
||||
# Get the name of tmpl_* functions in the above class.
|
||||
DefaultTemplateFunctions._func_names = \
|
||||
|
|
|
|||
|
|
@ -176,8 +176,7 @@ class BPSyncPlugin(BeetsPlugin):
|
|||
lib, item, move, pretend, write
|
||||
)
|
||||
|
||||
if not changed or pretend:
|
||||
# No change to any item.
|
||||
if pretend or not changed:
|
||||
continue
|
||||
|
||||
# Update album structure to reflect an item in it.
|
||||
|
|
|
|||
Loading…
Reference in a new issue