debugging

This commit is contained in:
j 2019-01-14 13:21:24 +05:30
parent 3a1b3a5c3c
commit 4a956e2a65
2 changed files with 1 additions and 2 deletions

View file

@ -800,6 +800,7 @@ class File(db.Model):
if os.path.exists(path) and os.path.exists(current_path): if os.path.exists(path) and os.path.exists(current_path):
os.unlink(path) os.unlink(path)
return return
logger.debug('mv "%s" "%s"', self.path, new_path)
self.path = new_path self.path = new_path
self.save() self.save()
for folder in set(os.path.dirname(p) for p in [current_path, path]): for folder in set(os.path.dirname(p) for p in [current_path, path]):

View file

@ -172,7 +172,6 @@ def run_scan():
elif user not in file.item.users: elif user not in file.item.users:
item = file.item item = file.item
item.add_user(user) item.add_user(user)
logger.debug('add %s to local user', id) logger.debug('add %s to local user', id)
add_record('additem', item.id, file.info) add_record('additem', item.id, file.info)
add_record('edititem', item.id, item.meta) add_record('edititem', item.id, item.meta)
@ -194,7 +193,6 @@ def run_scan():
library_items = set([str(i) for i in user.library.items]) library_items = set([str(i) for i in user.library.items])
gone = library_items - ids gone = library_items - ids
if gone: if gone:
logger.debug('cleaning up %s deleted records', len(gone))
for id in gone: for id in gone:
i = Item.get(id) i = Item.get(id)
path = i.get_path() path = i.get_path()