stop scan on shutdown

This commit is contained in:
j 2019-02-01 12:00:40 +05:30
parent 5a8e08b2c2
commit 028415c090

View file

@ -188,6 +188,8 @@ def run_scan():
file.item.added = file.item.accessed file.item.added = file.item.accessed
file.item.save() file.item.save()
library_items = len(user.library.items) library_items = len(user.library.items)
if state.shutdown:
return
if added: if added:
trigger_event('change', {}) trigger_event('change', {})
logger.debug('imported %s unknown books', added) logger.debug('imported %s unknown books', added)