✨ Downloader will check for FFmpeg before converting video files.

This commit is contained in:
Robert Honz
2024-03-22 15:50:06 +01:00
parent 12d3360c12
commit d331f93c91
4 changed files with 67 additions and 24 deletions
+8
View File
@@ -2,6 +2,7 @@ import glob
import math
import os
import re
import shutil
from pathlib import Path, PosixPath
from pathvalidate import sanitize_filename, sanitize_filepath
@@ -261,3 +262,10 @@ def check_file_exists(path_file: str, extension_ignore: bool = False) -> bool:
result = bool(sum([glob.glob(_file) for _file in path_files], []))
return result
def is_installed_ffmpeg() -> bool:
# Checks if ffmpeg is found in PATH.
result: bool = bool(shutil.which("ffmpeg"))
return result