mirror of
https://github.com/morpheus65535/bazarr
synced 2025-03-11 22:52:49 +00:00
Fix for mediainfo error on Linux.
This commit is contained in:
parent
d7c824500a
commit
3a1285e2da
3 changed files with 8 additions and 5 deletions
|
@ -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))
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -25,7 +25,8 @@
|
|||
<label>Use MediaInfo</label>
|
||||
</div>
|
||||
<div class="one wide column">
|
||||
<div id="settings_mediainfo" class="ui toggle checkbox" data-mediainfo={{settings.general.getboolean('use_mediainfo')}}>
|
||||
% import platform
|
||||
<div id="settings_mediainfo" class="ui toggle checkbox{{' disabled' if platform.system() == 'Linux' else ''}}" data-mediainfo={{settings.general.getboolean('use_mediainfo')}}>
|
||||
<input name="settings_general_mediainfo" type="checkbox">
|
||||
<label></label>
|
||||
</div>
|
||||
|
@ -39,7 +40,7 @@
|
|||
</div>
|
||||
<div class="collapsed column">
|
||||
<div class="collapsed center aligned column">
|
||||
<div class="ui basic icon" data-tooltip="To use this feature on linux, please install mediainfo and its dependencies." data-inverted="">
|
||||
<div class="ui basic icon" data-tooltip="This settings is only available on Windows and MacOS." data-inverted="">
|
||||
<i class="yellow warning sign icon"></i>
|
||||
</div>
|
||||
</div>
|
||||
|
|
Loading…
Add table
Reference in a new issue