1
0
Fork 0
mirror of https://github.com/morpheus65535/bazarr synced 2024-12-25 09:12:38 +00:00

Small fix for external subtitles hi detection.

This commit is contained in:
morpheus65535 2020-11-03 15:30:38 -05:00
parent 951f2f8a03
commit 5d99d3ddf9

View file

@ -479,6 +479,8 @@ def guess_external_subtitles(dest_folder, subtitles):
elif not subtitles[subtitle].hi:
subtitle_path = os.path.join(dest_folder, subtitle)
# check if file exist:
if os.path.exists(subtitle_path) and os.path.splitext(subtitle_path)[1] in core.SUBTITLE_EXTENSIONS:
# to improve performance, skip detection of files larger that 1M
if os.path.getsize(subtitle_path) > 1 * 1024 * 1024:
logging.debug("BAZARR subtitles file is too large to be text based. Skipping this file: " +