diff --git a/oml/item/scan.py b/oml/item/scan.py index 78c8fe6..e4a97a8 100644 --- a/oml/item/scan.py +++ b/oml/item/scan.py @@ -225,6 +225,7 @@ def run_scan(): missing = ids - library_items if missing: logger.debug('%s items in library without a record', len(missing)) + settings.server['last_scan'] = time.mktime(time.gmtime()) def change_path(old, new): old_icons = os.path.join(old, 'Metadata', 'icons.db') diff --git a/oml/tasks.py b/oml/tasks.py index 9f40975..d506853 100644 --- a/oml/tasks.py +++ b/oml/tasks.py @@ -36,8 +36,7 @@ class Tasks(Thread): def run(self): self.load_tasks() - if time.mktime(time.gmtime()) - settings.server.get('last_scan', 0) > 24*60*60: - settings.server['last_scan'] = time.mktime(time.gmtime()) + if (time.mktime(time.gmtime()) - settings.server.get('last_scan', 0)) > 24*60*60: self.queue('scan') import item.scan