dynamic dependency check

This commit is contained in:
henryruhs
2026-07-23 10:55:49 +02:00
parent e5851ac308
commit 9d29711414
2 changed files with 5 additions and 8 deletions
+4 -6
View File
@@ -90,13 +90,11 @@ def pre_check() -> bool:
logger.error(translator.get('python_not_supported').format(version = '3.10'), __name__)
return False
if not shutil.which('curl'):
logger.error(translator.get('curl_not_installed'), __name__)
return False
for dependency in [ 'curl', 'ffmpeg', 'ffprobe' ]:
if not shutil.which(dependency):
logger.error(translator.get('dependency_not_installed').format(dependency = dependency), __name__)
return False
if not shutil.which('ffmpeg'):
logger.error(translator.get('ffmpeg_not_installed'), __name__)
return False
return True
+1 -2
View File
@@ -6,8 +6,7 @@ LOCALES : Locales =\
{
'conda_not_activated': 'conda is not activated',
'python_not_supported': 'python version is not supported, upgrade to {version} or higher',
'curl_not_installed': 'curl is not installed',
'ffmpeg_not_installed': 'ffmpeg is not installed',
'dependency_not_installed': '{dependency} is not installed',
'creating_temp': 'creating temporary resources',
'extracting_frames': 'extracting frames with a resolution of {resolution} and {fps} frames per second',
'extracting_frames_succeeded': 'extracting frames succeeded',