diff --git a/couchpotato/core/plugins/searcher/__init__.py b/couchpotato/core/plugins/searcher/__init__.py index aec419a2..bed90eb2 100644 --- a/couchpotato/core/plugins/searcher/__init__.py +++ b/couchpotato/core/plugins/searcher/__init__.py @@ -57,6 +57,14 @@ config = [{ 'advanced': True, 'description': 'Cron settings for the searcher see: APScheduler for details.', 'options': [ + { + 'name': 'run_on_launch', + 'label': 'Run on launch', + 'advanced': True, + 'default': 0, + 'type': 'bool', + 'description': 'Force run the searcher after (re)start.', + }, { 'name': 'cron_day', 'label': 'Day', diff --git a/couchpotato/core/plugins/searcher/main.py b/couchpotato/core/plugins/searcher/main.py index 3d85a565..71077dbf 100644 --- a/couchpotato/core/plugins/searcher/main.py +++ b/couchpotato/core/plugins/searcher/main.py @@ -49,6 +49,9 @@ class Searcher(Plugin): }"""}, }) + if self.conf('run_on_launch'): + addEvent('app.load', self.allMovies) + addEvent('app.load', self.setCrons) addEvent('setting.save.searcher.cron_day.after', self.setCrons) addEvent('setting.save.searcher.cron_hour.after', self.setCrons)