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:
parent
951f2f8a03
commit
5d99d3ddf9
1 changed files with 30 additions and 28 deletions
|
@ -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: " +
|
||||
|
|
Loading…
Reference in a new issue