stop scan on shutdown

This commit is contained in:
j 2019-02-01 12:00:40 +05:30
parent 5a8e08b2c2
commit 028415c090
1 changed files with 2 additions and 0 deletions

View File

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