[ffmpeg] clean linux install

This commit is contained in:
jscampucci 2024-08-15 16:10:41 +02:00
parent bc4655090f
commit 9070349c83
1 changed files with 7 additions and 9 deletions

View File

@ -99,16 +99,14 @@ class DLServices {
} }
Future<void> checkFFmpeg() async { Future<void> checkFFmpeg() async {
try { var result = await futureShell('ffmpeg -version');
var result = await Process.run('ffmpeg', ['-version']);
FileLogger().d('$result'); FileLogger().d('$result');
if (result.exitCode == 0) { if (result.exitCode == 0) {
FileLogger().d('FFmpeg is already installed.'); FileLogger().d('FFmpeg is already installed.');
return; return;
} }
FileLogger().d('RESULTS: $result'); try {
FileLogger().d('Installing FFmpeg...'); FileLogger().d('Installing FFmpeg...');
if (Platform.isLinux) { if (Platform.isLinux) {
result = await Process.run('sudo', ['-n', 'true']); result = await Process.run('sudo', ['-n', 'true']);