Better readability

This commit is contained in:
Rahul Ahuja 2019-10-03 22:16:32 -07:00
parent 5e6b8f5264
commit ea03c7fac2
2 changed files with 9 additions and 9 deletions

View file

@ -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 = \

View file

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