|
|
@ -366,8 +366,14 @@ def guess_external_subtitles(dest_folder, subtitles):
|
|
|
|
subtitle_path)
|
|
|
|
subtitle_path)
|
|
|
|
continue
|
|
|
|
continue
|
|
|
|
detected_language = None
|
|
|
|
detected_language = None
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if six.PY3:
|
|
|
|
with open(subtitle_path, 'r', errors='ignore') as f:
|
|
|
|
with open(subtitle_path, 'r', errors='ignore') as f:
|
|
|
|
text = f.read()
|
|
|
|
text = f.read()
|
|
|
|
|
|
|
|
else:
|
|
|
|
|
|
|
|
with open(subtitle_path, 'r') as f:
|
|
|
|
|
|
|
|
text = f.read()
|
|
|
|
|
|
|
|
|
|
|
|
try:
|
|
|
|
try:
|
|
|
|
encoding = UnicodeDammit(text)
|
|
|
|
encoding = UnicodeDammit(text)
|
|
|
|
if six.PY2:
|
|
|
|
if six.PY2:
|
|
|
|