mirror of
https://github.com/morpheus65535/bazarr.git
synced 2025-02-15 02:15:37 +08:00
Exclude .sub of subtitles encoding detection
This commit is contained in:
parent
f3056a548a
commit
d130adfa6b
1 changed files with 13 additions and 12 deletions
|
@ -85,6 +85,7 @@ def store_subtitles_movie(file):
|
||||||
if str(language) != 'und':
|
if str(language) != 'und':
|
||||||
actual_subtitles.append([str(language), path_replace_reverse_movie(os.path.join(os.path.dirname(file), subtitle))])
|
actual_subtitles.append([str(language), path_replace_reverse_movie(os.path.join(os.path.dirname(file), subtitle))])
|
||||||
else:
|
else:
|
||||||
|
if os.path.splitext(subtitle)[1] != ".sub":
|
||||||
with open(path_replace_movie(os.path.join(os.path.dirname(file), subtitle)), 'r') as f:
|
with open(path_replace_movie(os.path.join(os.path.dirname(file), subtitle)), 'r') as f:
|
||||||
text = list(islice(f, 100))
|
text = list(islice(f, 100))
|
||||||
text = ' '.join(text)
|
text = ' '.join(text)
|
||||||
|
|
Loading…
Reference in a new issue