Fix for missing subtitles management after implementing HI.

pull/1101/head
Louis Vézina 4 years ago
parent f202b58bc0
commit 1409a152e9

@ -449,12 +449,10 @@ def guess_external_subtitles(dest_folder, subtitles):
else: else:
TAG = r"(?:\s*{\\[iusb][0-1]}\s*)*" TAG = r"(?:\s*{\\[iusb][0-1]}\s*)*"
music = re.compile(r'[-\s>~]*[*¶♫♪]+\s*.+|.+\s*[*¶♫♪]+\s*') music = re.compile(r'[-\s>~]*[*¶♫♪]+\s*.+|.+\s*[*¶♫♪]+\s*')
caps = re.compile(r'[A-ZÀ-Ž&+]{5,}')
brackets = re.compile(r'-?%(t)s["\']*[([][^([)\]]+?(?=[A-zÀ-ž"\'.]{3,})[^([)\]]+[)\]]["\']*[\s:]*%(t)s' brackets = re.compile(r'-?%(t)s["\']*[([][^([)\]]+?(?=[A-zÀ-ž"\'.]{3,})[^([)\]]+[)\]]["\']*[\s:]*%(t)s'
% {"t": TAG}) % {"t": TAG})
HI_list = [music, caps, brackets] HI_list = [music, brackets]
# HI_list = [music, brackets]
for item in HI_list: for item in HI_list:
if bool(re.search(item, text)): if bool(re.search(item, text)):

Loading…
Cancel
Save