pull/997/head
Louis Vézina 5 years ago
parent 4074e85b1c
commit 7e0c298dd7

@ -2,7 +2,6 @@
import os import os
import ast import ast
import libs
from datetime import timedelta from datetime import timedelta
import datetime import datetime
import pretty import pretty
@ -31,7 +30,7 @@ from list_subtitles import store_subtitles, store_subtitles_movie, series_scan_s
from utils import history_log, history_log_movie, get_sonarr_version, get_radarr_version from utils import history_log, history_log_movie, get_sonarr_version, get_radarr_version
from get_providers import get_providers, get_providers_auth, list_throttled_providers, reset_throttled_providers from get_providers import get_providers, get_providers_auth, list_throttled_providers, reset_throttled_providers
from event_handler import event_stream from event_handler import event_stream
from scheduler import Scheduler from scheduler import scheduler
from subliminal_patch.core import SUBTITLE_EXTENSIONS from subliminal_patch.core import SUBTITLE_EXTENSIONS
@ -43,8 +42,6 @@ from functools import wraps
api_bp = Blueprint('api', __name__, url_prefix=base_url.rstrip('/')+'/api') api_bp = Blueprint('api', __name__, url_prefix=base_url.rstrip('/')+'/api')
api = Api(api_bp) api = Api(api_bp)
scheduler = Scheduler()
def authenticate(actual_method): def authenticate(actual_method):
@wraps(actual_method) @wraps(actual_method)

@ -18,7 +18,6 @@ from subliminal import region, score as subliminal_scores, \
from subliminal_patch.core import SZAsyncProviderPool, download_best_subtitles, save_subtitles, download_subtitles, \ from subliminal_patch.core import SZAsyncProviderPool, download_best_subtitles, save_subtitles, download_subtitles, \
list_all_subtitles, get_subtitle_path list_all_subtitles, get_subtitle_path
from subliminal_patch.score import compute_score from subliminal_patch.score import compute_score
from subliminal.refiners.tvdb import series_re
from get_languages import language_from_alpha3, alpha2_from_alpha3, alpha3_from_alpha2, language_from_alpha2, \ from get_languages import language_from_alpha3, alpha2_from_alpha3, alpha3_from_alpha2, language_from_alpha2, \
alpha2_from_language, alpha3_from_language alpha2_from_language, alpha3_from_language
from config import settings from config import settings

@ -5,12 +5,10 @@ import os
import logging import logging
import ast import ast
from guess_language import guess_language from guess_language import guess_language
import subliminal
import subliminal_patch import subliminal_patch
from subliminal import core from subliminal import core
from subliminal_patch import search_external_subtitles from subliminal_patch import search_external_subtitles
from subzero.language import Language from subzero.language import Language
import six
from database import database from database import database
from get_languages import alpha2_from_alpha3, get_language_set from get_languages import alpha2_from_alpha3, get_language_set

@ -3,7 +3,6 @@
bazarr_version = '0.9' bazarr_version = '0.9'
import os import os
os.environ["SZ_USER_AGENT"] = "Bazarr/1"
os.environ["BAZARR_VERSION"] = bazarr_version os.environ["BAZARR_VERSION"] = bazarr_version
import gc import gc
@ -34,13 +33,10 @@ from get_series import *
from get_episodes import * from get_episodes import *
from get_movies import * from get_movies import *
from scheduler import Scheduler
from check_update import check_and_apply_update from check_update import check_and_apply_update
from server import app, webserver from server import app, webserver
from functools import wraps from functools import wraps
scheduler = Scheduler()
# Check and install update on startup when running on Windows from installer # Check and install update on startup when running on Windows from installer
if args.release_update: if args.release_update:
check_and_apply_update() check_and_apply_update()

@ -16,9 +16,7 @@ from apscheduler.triggers.interval import IntervalTrigger
from apscheduler.triggers.cron import CronTrigger from apscheduler.triggers.cron import CronTrigger
from apscheduler.triggers.date import DateTrigger from apscheduler.triggers.date import DateTrigger
from apscheduler.events import EVENT_JOB_SUBMITTED, EVENT_JOB_EXECUTED, EVENT_JOB_ERROR from apscheduler.events import EVENT_JOB_SUBMITTED, EVENT_JOB_EXECUTED, EVENT_JOB_ERROR
from datetime import datetime, timedelta, date from datetime import datetime, timedelta
import pytz
from tzlocal import get_localzone
from calendar import day_name from calendar import day_name
import pretty import pretty
from random import randrange from random import randrange
@ -251,3 +249,6 @@ class Scheduler:
def __no_task(self): def __no_task(self):
for job in self.aps_scheduler.get_jobs(): for job in self.aps_scheduler.get_jobs():
self.aps_scheduler.modify_job(job.id, next_run_time=None) self.aps_scheduler.modify_job(job.id, next_run_time=None)
scheduler = Scheduler()

Loading…
Cancel
Save