delay debug output
This commit is contained in:
parent
fb04c9fef0
commit
f104a688f2
1 changed files with 4 additions and 1 deletions
|
@ -195,9 +195,9 @@ def run_scan():
|
|||
if len(ids) != len(books):
|
||||
logger.debug('number of books %s vs number of ids %s', len(books), len(ids))
|
||||
if library_items != len(books):
|
||||
logger.debug('number of books %s vs number of items in library %s', len(books), library_items)
|
||||
library_items = set([str(i) for i in user.library.items])
|
||||
gone = library_items - ids
|
||||
first = True
|
||||
if gone:
|
||||
for id in gone:
|
||||
i = Item.get(id)
|
||||
|
@ -205,6 +205,9 @@ def run_scan():
|
|||
continue
|
||||
path = i.get_path()
|
||||
if not path or not os.path.exists(path):
|
||||
if first:
|
||||
logger.debug('number of books %s vs number of items in library %s', len(books), library_items)
|
||||
first = False
|
||||
logger.debug('cleaning orphaned record %s %s', i, path)
|
||||
i.remove_file()
|
||||
missing = ids - library_items
|
||||
|
|
Loading…
Reference in a new issue