bazarr/scheduler.py

12 lines
582 B
Python
Raw Normal View History

2017-10-23 11:00:11 +08:00
from get_series import *
from get_episodes import *
from get_subtitle import *
2017-10-17 07:27:19 +08:00
2017-10-23 11:00:11 +08:00
from apscheduler.schedulers.background import BackgroundScheduler
2017-10-17 07:27:19 +08:00
2017-10-23 11:00:11 +08:00
scheduler = BackgroundScheduler()
scheduler.add_job(update_series, 'interval', minutes=1, id='update_series', name='Update series list from Sonarr')
scheduler.add_job(add_new_episodes, 'interval', minutes=1, id='add_new_episodes', name='Add new episodes from Sonarr')
scheduler.add_job(wanted_search_missing_subtitles, 'interval', minutes=15, id='wanted_search_missing_subtitles', name='Search for wanted subtitles')
scheduler.start()