'Synchronize the item with the database and, possibly, updates its
tags on disk and its path (by moving the file).
`write` indicates whether to write new tags into the file. Similarly,
`move` controls whether the path should be updated. In the
latter case, files are *only* moved when they are inside their
library\'s directory (if any).
Similar to calling :meth:`write`, :meth:`move`, and :meth:`store`
(conditionally).'

def try_sync(self, write, move, with_album=True):

    if write:
        self.try_write()
    if move:
        if (self._db and (self._db.directory in util.ancestry(self.path))):
            log.debug(u'moving    {0}    to    synchronize    path', util.displayable_path(self.path))
            self.move(with_album=with_album)
    self.store()
