From 4d6beabfb82ccb0a44c0b0c6d18558a199291b59 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Louis=20V=C3=A9zina?= <5130500+morpheus65535@users.noreply.github.com> Date: Tue, 7 Nov 2017 00:17:14 -0500 Subject: [PATCH] Really functionnal update --- bazarr.py | 1 - check_update.py | 2 +- scheduler.py | 3 ++- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/bazarr.py b/bazarr.py index b31e6cd35..f68e9c4c3 100644 --- a/bazarr.py +++ b/bazarr.py @@ -19,7 +19,6 @@ from fdsend import send_file import urllib from init_db import * -from check_update import * from get_languages import * from get_providers import * diff --git a/check_update.py b/check_update.py index 32615be07..5efe71e75 100644 --- a/check_update.py +++ b/check_update.py @@ -3,7 +3,7 @@ from get_general_settings import * import os import subprocess -def check_and_apply_update: +def check_and_apply_update(): result = subprocess.check_output(["git", "pull", '--dry-run', 'origin', branch], stderr=subprocess.STDOUT).split('\n') if result[2] is not '': diff --git a/scheduler.py b/scheduler.py index 82e93bbb5..8028fd7c3 100644 --- a/scheduler.py +++ b/scheduler.py @@ -1,11 +1,12 @@ from get_series import * from get_episodes import * from get_subtitle import * +from check_update import * from apscheduler.schedulers.background import BackgroundScheduler scheduler = BackgroundScheduler() -scheduler.add_job(update_bazarr, 'interval', hours=6, max_instances=1, coalesce=True, id='update_bazarr', name='Update bazarr from source on Github') +scheduler.add_job(check_and_apply_update, 'interval', hours=6, max_instances=1, coalesce=True, id='update_bazarr', name='Update bazarr from source on Github') scheduler.add_job(update_series, 'interval', minutes=1, max_instances=1, coalesce=True, id='update_series', name='Update series list from Sonarr') scheduler.add_job(add_new_episodes, 'interval', minutes=1, max_instances=1, coalesce=True, id='add_new_episodes', name='Add new episodes from Sonarr') scheduler.add_job(wanted_search_missing_subtitles, 'interval', minutes=15, max_instances=1, coalesce=True, id='wanted_search_missing_subtitles', name='Search for wanted subtitles')