faster startup check
This commit is contained in:
parent
0416e1719f
commit
2dbe65721c
2 changed files with 41 additions and 17 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue