diff options
| author | Robert Honz <exislow+github@gmail.com> | 2024-03-22 15:50:06 +0100 |
|---|---|---|
| committer | Robert Honz <exislow+github@gmail.com> | 2024-03-22 15:50:06 +0100 |
| commit | d331f93c911c4d008904177de15619b30955227e (patch) | |
| tree | 4587ab7208dc4435ee119c9f8812325770f0b654 /tidal_dl_ng/helper/path.py | |
| parent | 12d3360c1204a5d267e276b58e36ef2f8e6f7a3c (diff) | |
| download | tidal-dl-ng-d331f93c911c4d008904177de15619b30955227e.tar.gz | |
✨ Downloader will check for FFmpeg before converting video files.
Diffstat (limited to 'tidal_dl_ng/helper/path.py')
| -rw-r--r-- | tidal_dl_ng/helper/path.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tidal_dl_ng/helper/path.py b/tidal_dl_ng/helper/path.py index 43dd9de..2b739d6 100644 --- a/tidal_dl_ng/helper/path.py +++ b/tidal_dl_ng/helper/path.py @@ -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 |
