From bf09ae8ec14ce707bace01bb3511c3d76efded59 Mon Sep 17 00:00:00 2001 From: Vitiko Date: Sat, 8 Jan 2022 15:51:42 -0400 Subject: [PATCH] no log: update get_providers This will avoid calling get_binary on each pool update/get_providers_auth() call. --- bazarr/get_providers.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/bazarr/get_providers.py b/bazarr/get_providers.py index bbe445927..ad909cf4f 100644 --- a/bazarr/get_providers.py +++ b/bazarr/get_providers.py @@ -123,6 +123,10 @@ def get_providers(): return providers_list +_FFPROBE_BINARY = get_binary("ffprobe") +_FFMPEG_BINARY= get_binary("ffmpeg") + + def get_providers_auth(): return { 'addic7ed': { @@ -208,8 +212,8 @@ def get_providers_auth(): 'include_srt': settings.embeddedsubtitles.getboolean('include_srt'), 'hi_fallback': settings.embeddedsubtitles.getboolean('hi_fallback'), 'cache_dir': os.path.join(args.config_dir, "cache"), - 'ffprobe_path': get_binary("ffprobe"), - 'ffmpeg_path': get_binary("ffmpeg"), + 'ffprobe_path': _FFPROBE_BINARY, + 'ffmpeg_path': _FFMPEG_BINARY, } }