♻️ ffmpeg will be checked against the path in config.
This commit is contained in:
@@ -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.decryption import decrypt_file, decrypt_security_token
|
||||||
from tidal_dl_ng.helper.exceptions import MediaMissing, UnknownManifestFormat
|
from tidal_dl_ng.helper.exceptions import MediaMissing, UnknownManifestFormat
|
||||||
from tidal_dl_ng.helper.path import check_file_exists, format_path_media, is_installed_ffmpeg, path_file_sanitize
|
from tidal_dl_ng.helper.path import check_file_exists, format_path_media, path_file_sanitize
|
||||||
from tidal_dl_ng.helper.tidal import (
|
from tidal_dl_ng.helper.tidal import (
|
||||||
instantiate_media,
|
instantiate_media,
|
||||||
items_results_all,
|
items_results_all,
|
||||||
@@ -82,11 +82,11 @@ class Download:
|
|||||||
self.progress = progress
|
self.progress = progress
|
||||||
self.path_base = path_base
|
self.path_base = path_base
|
||||||
|
|
||||||
if not is_installed_ffmpeg() and self.settings.data.video_convert_mp4:
|
if not self.settings.data.path_binary_ffmpeg and self.settings.data.video_convert_mp4:
|
||||||
self.settings.data.video_convert_mp4 = False
|
self.settings.data.video_convert_mp4 = False
|
||||||
self.fn_logger.error(
|
self.fn_logger.error(
|
||||||
"Cannot find FFmpeg in PATH. Videos can be downloaded but will not be processed. "
|
"FFmpeg in path is not set. Videos can be downloaded but will not be processed. "
|
||||||
"Make sure FFmpeg is installed correctly and present within your environmental PATH variable."
|
"Make sure FFmpeg is installed and the path to the binary is configured ('path_binary_ffmpeg')."
|
||||||
)
|
)
|
||||||
|
|
||||||
def _download(
|
def _download(
|
||||||
|
|||||||
@@ -2,7 +2,6 @@ import glob
|
|||||||
import math
|
import math
|
||||||
import os
|
import os
|
||||||
import re
|
import re
|
||||||
import shutil
|
|
||||||
from pathlib import Path, PosixPath
|
from pathlib import Path, PosixPath
|
||||||
|
|
||||||
from pathvalidate import sanitize_filename, sanitize_filepath
|
from pathvalidate import sanitize_filename, sanitize_filepath
|
||||||
@@ -244,10 +243,3 @@ def check_file_exists(path_file: str, extension_ignore: bool = False) -> bool:
|
|||||||
result = bool(sum([glob.glob(_file) for _file in path_files], []))
|
result = bool(sum([glob.glob(_file) for _file in path_files], []))
|
||||||
|
|
||||||
return result
|
return result
|
||||||
|
|
||||||
|
|
||||||
def is_installed_ffmpeg() -> bool:
|
|
||||||
# Checks if ffmpeg is found in PATH.
|
|
||||||
result: bool = bool(shutil.which("ffmpeg"))
|
|
||||||
|
|
||||||
return result
|
|
||||||
|
|||||||
Reference in New Issue
Block a user