diff options
| author | Maya Doshi <maya-doshi@proton.me> | 2024-06-26 15:23:04 -0700 |
|---|---|---|
| committer | Maya Doshi <maya-doshi@proton.me> | 2024-06-26 15:23:04 -0700 |
| commit | 17f488910d447465826ebb8706a607d27516e425 (patch) | |
| tree | 10082affbaca70df99a08ff20b6541114178befa | |
| parent | 8c66549b9f161625e065676d04e5d72a2245411c (diff) | |
| download | tidal-dl-ng-17f488910d447465826ebb8706a607d27516e425.tar.gz | |
Autodetect ffmpeg path if not present in configuration
| -rw-r--r-- | tidal_dl_ng/download.py | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/tidal_dl_ng/download.py b/tidal_dl_ng/download.py index c4b786f..9eae10c 100644 --- a/tidal_dl_ng/download.py +++ b/tidal_dl_ng/download.py @@ -75,13 +75,15 @@ class Download: if not self.settings.data.path_binary_ffmpeg and ( self.settings.data.video_convert_mp4 or self.settings.data.extract_flac ): - self.settings.data.video_convert_mp4 = False - self.settings.data.extract_flac = False + self.settings.data.path_binary_ffmpeg = shutil.which("ffmpeg") + if not self.settings.data.path_binary_ffmpeg: + self.settings.data.video_convert_mp4 = False + self.settings.data.extract_flac = False - self.fn_logger.error( - "FFmpeg is not set. Videos can be downloaded but will not be processed. FLAC cannot be extracted from MP4 containers. " - "Make sure FFmpeg is installed and the path to the binary is configured (`path_binary_ffmpeg`)." - ) + self.fn_logger.error( + "FFmpeg is not set. Videos can be downloaded but will not be processed. FLAC cannot be extracted from MP4 containers. " + "Make sure FFmpeg is installed and the path to the binary is configured (`path_binary_ffmpeg`)." + ) def _download( self, |
