This commit is contained in:
Louis Vézina 2019-10-28 10:38:57 -04:00
parent 9164c73f39
commit b1a0e5e0ea
3 changed files with 8 additions and 5 deletions

View File

@ -120,7 +120,7 @@ def init_binaries():
rarfile.OPEN_ARGS = rarfile.ORIG_OPEN_ARGS
rarfile.EXTRACT_ARGS = rarfile.ORIG_EXTRACT_ARGS
rarfile.TEST_ARGS = rarfile.ORIG_TEST_ARGS
logging.info("Using UnRAR from: %s", exe)
logging.debug("Using UnRAR from: %s", exe)
unrar = exe
return unrar

View File

@ -71,6 +71,7 @@ def configure_logging(debug=False):
logger.addHandler(fh)
if debug:
logging.getLogger("sqlite3worker").setLevel(logging.DEBUG)
logging.getLogger("apscheduler").setLevel(logging.DEBUG)
logging.getLogger("subliminal").setLevel(logging.DEBUG)
logging.getLogger("subliminal_patch").setLevel(logging.DEBUG)
@ -82,6 +83,7 @@ def configure_logging(debug=False):
logging.debug('Operating system: %s', platform.platform())
logging.debug('Python version: %s', platform.python_version())
else:
logging.getLogger("sqlite3worker").setLevel(logging.CRITICAL)
logging.getLogger("apscheduler").setLevel(logging.WARNING)
logging.getLogger("subliminal").setLevel(logging.CRITICAL)
logging.getLogger("subliminal_patch").setLevel(logging.CRITICAL)

View File

@ -21,11 +21,15 @@ import operator
from calendar import day_name
from get_args import args
from logger import configure_logging, empty_log
from config import settings, url_sonarr, url_radarr, url_radarr_short, url_sonarr_short, base_url
configure_logging(settings.general.getboolean('debug') or args.debug)
from init import *
from database import database, dict_mapper
from notifier import update_notifier
from logger import configure_logging, empty_log
from cherrypy.wsgiserver import CherryPyWSGIServer
@ -48,7 +52,6 @@ from get_subtitle import download_subtitle, series_download_subtitles, movies_do
from utils import history_log, history_log_movie, get_sonarr_version, get_radarr_version
from scheduler import *
from notifier import send_notifications, send_notifications_movie
from config import settings, url_sonarr, url_radarr, url_radarr_short, url_sonarr_short, base_url
from subliminal_patch.extensions import provider_registry as provider_manager
from subliminal_patch.core import SUBTITLE_EXTENSIONS
@ -59,8 +62,6 @@ gc.enable()
os.environ["SZ_USER_AGENT"] = "Bazarr/1"
os.environ["BAZARR_VERSION"] = bazarr_version
configure_logging(settings.general.getboolean('debug') or args.debug)
# Check and install update on startup when running on Windows from installer
if args.release_update:
check_and_apply_update()