From 3a1285e2da451ec0015954ea29c58deb3f08781a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Louis=20V=C3=A9zina?= <5130500+morpheus65535@users.noreply.github.com> Date: Tue, 13 Aug 2019 13:46:29 -0400 Subject: [PATCH] Fix for mediainfo error on Linux. --- bazarr/get_subtitle.py | 3 ++- bazarr/utils.py | 5 +++-- views/settings_subtitles.tpl | 5 +++-- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/bazarr/get_subtitle.py b/bazarr/get_subtitle.py index 931fef56a..883f80a90 100644 --- a/bazarr/get_subtitle.py +++ b/bazarr/get_subtitle.py @@ -12,6 +12,7 @@ import codecs import types import re import subliminal +import platform from datetime import datetime, timedelta from subzero.language import Language from subzero.video import parse_video @@ -65,7 +66,7 @@ def get_video(path, title, sceneName, use_scenename, use_mediainfo, providers=No video.original_path = original_path refine_from_db(original_path, video) - if use_mediainfo: + if platform.system() != "Linux" and use_mediainfo: refine_from_mediainfo(original_path, video) logging.debug('BAZARR is using those video object properties: %s', vars(video)) diff --git a/bazarr/utils.py b/bazarr/utils.py index b149524c3..b9721921c 100644 --- a/bazarr/utils.py +++ b/bazarr/utils.py @@ -53,9 +53,10 @@ def get_binary(name): binaries_dir = os.path.realpath(os.path.join(os.path.dirname(__file__), '..', 'bin')) exe = None - installed_exe = which(name) + if name != 'mediainfo': + installed_exe = which(name) - if installed_exe and os.path.isfile(installed_exe): + if name != 'mediainfo' and installed_exe and os.path.isfile(installed_exe): return installed_exe else: if platform.system() == "Windows": # Windows diff --git a/views/settings_subtitles.tpl b/views/settings_subtitles.tpl index b0a44c2c5..aec1f307f 100644 --- a/views/settings_subtitles.tpl +++ b/views/settings_subtitles.tpl @@ -25,7 +25,8 @@