From d331f93c911c4d008904177de15619b30955227e Mon Sep 17 00:00:00 2001 From: Robert Honz Date: Fri, 22 Mar 2024 15:50:06 +0100 Subject: ✨ Downloader will check for FFmpeg before converting video files. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tidal_dl_ng/helper/path.py | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'tidal_dl_ng/helper/path.py') 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 -- cgit v1.3.1