Add advanced option to search on launch. fix #1887
This commit is contained in:
1 parent
3e667ee39a
commit
8c77d0d775
2 files changed
+11
No files matched your search
@@ -57,6 +57,14 @@ config = [{
|
|||||||
'advanced': True,
|
'advanced': True,
|
||||||
'description': 'Cron settings for the searcher see: <a href="http://packages.python.org/APScheduler/cronschedule.html">APScheduler</a> for details.',
|
'description': 'Cron settings for the searcher see: <a href="http://packages.python.org/APScheduler/cronschedule.html">APScheduler</a> for details.',
|
||||||
'options': [
|
'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',
|
'name': 'cron_day',
|
||||||
'label': '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('app.load', self.setCrons)
|
||||||
addEvent('setting.save.searcher.cron_day.after', self.setCrons)
|
addEvent('setting.save.searcher.cron_day.after', self.setCrons)
|
||||||
addEvent('setting.save.searcher.cron_hour.after', self.setCrons)
|
addEvent('setting.save.searcher.cron_hour.after', self.setCrons)
|
||||||
|
|||||||
Reference in new issue
Block a user