From ca0123c03668872514be0067b2ad4ac6cd2fe3ca Mon Sep 17 00:00:00 2001 From: josdion Date: Tue, 9 Jun 2020 20:11:48 +0300 Subject: [PATCH] don't check for language code if the subtitle file name is the same as the video name if the subtitle file name is the same as the video name, it is pointless to check the language code --- libs/subliminal_patch/core.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/libs/subliminal_patch/core.py b/libs/subliminal_patch/core.py index 2746522ff..397effcfe 100644 --- a/libs/subliminal_patch/core.py +++ b/libs/subliminal_patch/core.py @@ -605,6 +605,11 @@ def _search_external_subtitles(path, languages=None, only_one=False, scandir_gen if not INCLUDE_EXOTIC_SUBS and p_ext not in (".srt", ".ass", ".ssa", ".vtt"): continue + if p_root.lower() == fn_no_ext_lower: + # skip check for language code is the subtitle file name is the same as the video name + subtitles[p] = None + continue + # extract potential forced/normal/default tag # fixme: duplicate from subtitlehelpers split_tag = p_root.rsplit('.', 1)