fix file check
This commit is contained in:
parent
ca29c73043
commit
554e65cbd3
1 changed files with 3 additions and 2 deletions
|
@ -197,8 +197,9 @@ def run_scan():
|
|||
logger.debug('cleaning up %s deleted records', len(gone))
|
||||
for id in gone:
|
||||
i = Item.get(id)
|
||||
if not i.file or not os.path.exists(i.file.fullpath()):
|
||||
logger.debug('cleaning orphaned record %s %s', i, i.file.fullpath() if i.file else '')
|
||||
path = i.get_path()
|
||||
if path and not os.path.exists(path):
|
||||
logger.debug('cleaning orphaned record %s %s', i, path)
|
||||
i.remove_file()
|
||||
missing = ids - library_items
|
||||
if missing:
|
||||
|
|
Loading…
Reference in a new issue