summaryrefslogtreecommitdiff
path: root/tidal_dl_ng/download.py
diff options
context:
space:
mode:
authorRobert Honz <exislow+github@gmail.com>2024-03-22 15:50:06 +0100
committerRobert Honz <exislow+github@gmail.com>2024-03-22 15:50:06 +0100
commitd331f93c911c4d008904177de15619b30955227e (patch)
tree4587ab7208dc4435ee119c9f8812325770f0b654 /tidal_dl_ng/download.py
parent12d3360c1204a5d267e276b58e36ef2f8e6f7a3c (diff)
downloadtidal-dl-ng-d331f93c911c4d008904177de15619b30955227e.tar.gz
✨ Downloader will check for FFmpeg before converting video files.
Diffstat (limited to 'tidal_dl_ng/download.py')
-rw-r--r--tidal_dl_ng/download.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/tidal_dl_ng/download.py b/tidal_dl_ng/download.py
index 1ca62e5..2afdf20 100644
--- a/tidal_dl_ng/download.py
+++ b/tidal_dl_ng/download.py
@@ -29,7 +29,7 @@ from tidal_dl_ng.constants import (
)
from tidal_dl_ng.helper.decryption import decrypt_file, decrypt_security_token
from tidal_dl_ng.helper.exceptions import MediaMissing, UnknownManifestFormat
-from tidal_dl_ng.helper.path import check_file_exists, format_path_media, path_file_sanitize
+from tidal_dl_ng.helper.path import check_file_exists, format_path_media, is_installed_ffmpeg, path_file_sanitize
from tidal_dl_ng.helper.tidal import (
instantiate_media,
items_results_all,
@@ -82,6 +82,13 @@ class Download:
self.progress = progress
self.path_base = path_base
+ if not is_installed_ffmpeg() and self.settings.data.video_convert_mp4:
+ self.settings.data.video_convert_mp4 = False
+ self.fn_logger.error(
+ "Cannot find FFmpeg in PATH. Videos can be downloaded but will not be processed. "
+ "Make sure FFmpeg is installed correctly and present within your environmental PATH variable."
+ )
+
def _download(
self,
media: Track | Video,