From 5efc838749132819ddfa7d37f7c41871929dc467 Mon Sep 17 00:00:00 2001 From: Vitiko Date: Thu, 19 Oct 2023 22:27:42 -0400 Subject: [PATCH] Avoid FileNotFoundError indexing subtitles --- libs/subliminal_patch/core.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libs/subliminal_patch/core.py b/libs/subliminal_patch/core.py index 8be54828b..a8aaae19d 100644 --- a/libs/subliminal_patch/core.py +++ b/libs/subliminal_patch/core.py @@ -872,14 +872,14 @@ def _search_external_subtitles(path, languages=None, only_one=False, match_stric dirpath, filename = os.path.split(path) dirpath = dirpath or '.' fn_no_ext, fileext = os.path.splitext(filename) - fn_no_ext_lower = unicodedata.normalize('NFC', fn_no_ext.lower()) + fn_no_ext_lower = fn_no_ext.lower() # unicodedata.normalize('NFC', fn_no_ext.lower()) subtitles = {} for entry in scandir(dirpath): if not entry.is_file(follow_symlinks=False): continue - p = unicodedata.normalize('NFC', entry.name) + p = entry.name # unicodedata.normalize('NFC', entry.name) # keep only valid subtitle filenames if not p.lower().endswith(SUBTITLE_EXTENSIONS):