more cleanup fallbacks

This commit is contained in:
j 2019-01-13 18:35:01 +05:30
commit 3a1b3a5c3c
2 changed files with 10 additions and 3 deletions

View file

@ -198,7 +198,7 @@ def run_scan():
for id in gone:
i = Item.get(id)
path = i.get_path()
if path and not os.path.exists(path):
if not path or not os.path.exists(path):
logger.debug('cleaning orphaned record %s %s', i, path)
i.remove_file()
missing = ids - library_items