Add advanced option to search on launch. fix #1887
This commit is contained in:
@@ -57,6 +57,14 @@ config = [{
|
||||
'advanced': True,
|
||||
'description': 'Cron settings for the searcher see: <a href="http://packages.python.org/APScheduler/cronschedule.html">APScheduler</a> 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',
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user