mirror of
https://github.com/morpheus65535/bazarr
synced 2024-12-23 16:23:41 +00:00
Fixed issue with indexing of external subtitles that include utf8 characters in file name.
This commit is contained in:
parent
89fa25cddf
commit
b7e908645e
1 changed files with 2 additions and 1 deletions
|
@ -10,6 +10,7 @@ import socket
|
||||||
import traceback
|
import traceback
|
||||||
import time
|
import time
|
||||||
import operator
|
import operator
|
||||||
|
import unicodedata
|
||||||
|
|
||||||
import itertools
|
import itertools
|
||||||
from six.moves.http_client import ResponseNotReady
|
from six.moves.http_client import ResponseNotReady
|
||||||
|
@ -784,7 +785,7 @@ def _search_external_subtitles(path, languages=None, only_one=False, scandir_gen
|
||||||
if not entry.is_file(follow_symlinks=False):
|
if not entry.is_file(follow_symlinks=False):
|
||||||
continue
|
continue
|
||||||
|
|
||||||
p = entry.name
|
p = unicodedata.normalize('NFC', entry.name)
|
||||||
|
|
||||||
# keep only valid subtitle filenames
|
# keep only valid subtitle filenames
|
||||||
if not p.lower().endswith(SUBTITLE_EXTENSIONS):
|
if not p.lower().endswith(SUBTITLE_EXTENSIONS):
|
||||||
|
|
Loading…
Reference in a new issue