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
pull/1038/head
josdion 4 years ago
parent 183fc8f7d3
commit ca0123c036

@ -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)

Loading…
Cancel
Save