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):
os.unlink(path)
return
logger.debug('mv "%s" "%s"', self.path, new_path)
self.path = new_path
self.save()
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:
item = file.item
item.add_user(user)
logger.debug('add %s to local user', id)
add_record('additem', item.id, file.info)
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])
gone = library_items - ids
if gone:
logger.debug('cleaning up %s deleted records', len(gone))
for id in gone:
i = Item.get(id)
path = i.get_path()