faster startup check

This commit is contained in:
j 2016-02-13 17:10:37 +05:30
commit 2dbe65721c
2 changed files with 41 additions and 17 deletions

View file

@ -724,8 +724,6 @@ class File(db.Model):
logger.debug('file is missing. %s', current_path)
return
self.make_readonly()
author = '; '.join([get_sort_name(a) for a in j.get('author', [])])
if not author:
author = 'Unknown Author'
@ -775,6 +773,7 @@ class File(db.Model):
self.save()
for folder in set(os.path.dirname(p) for p in [current_path, path]):
remove_empty_folders(folder)
self.make_readonly()
def save(self):
state.db.session.add(self)