pull/684/head
Louis Vézina 5 years ago
parent 59c6a269ab
commit 607af5c2f5

@ -42,7 +42,8 @@ class NoExceptionFormatter(logging.Formatter):
def configure_logging(debug=False):
warnings.simplefilter('ignore', category=ResourceWarning)
if six.PY3:
warnings.simplefilter('ignore', category=ResourceWarning)
if not debug:
log_level = "INFO"

@ -61,6 +61,9 @@ from config import settings, url_sonarr, url_radarr, url_radarr_short, url_sonar
from subliminal_patch.extensions import provider_registry as provider_manager
from subliminal_patch.core import SUBTITLE_EXTENSIONS
if six.PY2:
reload(sys)
sys.setdefaultencoding('utf8')
gc.enable()
os.environ["SZ_USER_AGENT"] = "Bazarr/1"

@ -176,7 +176,7 @@ class VideoFileParser:
IOError: ffprobe execution failed
"""
command = [parser] + commandArgs + [inputFile]
command = [parser] + commandArgs + [inputFile.encode(getfilesystemencoding())]
if PY3:
completedProcess = subprocess.run(
command, stdout=subprocess.PIPE, stderr=subprocess.PIPE, encoding="utf-8"

Loading…
Cancel
Save