diff --git a/app/library/Utils.py b/app/library/Utils.py index bad19221..45c26df1 100644 --- a/app/library/Utils.py +++ b/app/library/Utils.py @@ -545,6 +545,9 @@ def get_sidecar_subtitles(file: pathlib.Path) -> list[dict]: if f.suffix not in ALLOWED_SUBS_EXTENSIONS: continue + if f.stat().st_size < 1: + continue + lg = re.search(r"\.(?P\w{2,3})\.\w{3}$", f.name) lang = lg.groupdict().get("lang") if lg else "und"