mirror of
https://github.com/morpheus65535/bazarr.git
synced 2025-04-24 06:37:16 -04:00
Fix #886
Ignore external subtitles files only if the encoding confidence is below 0.6. Hope this will fix any remaining encoding related issues.
This commit is contained in:
parent
51bf6964bf
commit
5ad70d940f
1 changed files with 1 additions and 1 deletions
|
@ -383,7 +383,7 @@ def guess_external_subtitles(dest_folder, subtitles):
|
|||
logging.debug('BAZARR detected encoding %r', guess)
|
||||
if guess["confidence"] < 0.6:
|
||||
raise UnicodeError
|
||||
if guess["confidence"] < 0.7 or guess["encoding"] == "ascii":
|
||||
if guess["encoding"] == "ascii":
|
||||
guess["encoding"] = "utf-8"
|
||||
text = text.decode(guess["encoding"])
|
||||
detected_language = guess_language(text)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue