From 2476037c0929a1014e1cea7aab164ba6a8306c77 Mon Sep 17 00:00:00 2001 From: fofolee Date: Mon, 17 Feb 2025 09:04:41 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=8D=E5=86=8D=E6=A0=B9=E6=8D=AE=E7=B3=BB?= =?UTF-8?q?=E7=BB=9F=E5=92=8C=E7=8E=AF=E5=A2=83=E9=9A=90=E8=97=8Fwin?= =?UTF-8?q?=E8=87=AA=E5=8A=A8=E5=8C=96=E3=80=81mac=E8=87=AA=E5=8A=A8?= =?UTF-8?q?=E5=8C=96=E5=92=8C=E8=A7=86=E9=A2=91=E5=A4=84=E7=90=86=E5=88=86?= =?UTF-8?q?=E7=B1=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugin/lib/quickcomposer/video/ffmpeg.js | 6 ++++++ src/js/composer/commands/index.js | 11 +++-------- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/plugin/lib/quickcomposer/video/ffmpeg.js b/plugin/lib/quickcomposer/video/ffmpeg.js index 6f048d4..2402d91 100644 --- a/plugin/lib/quickcomposer/video/ffmpeg.js +++ b/plugin/lib/quickcomposer/video/ffmpeg.js @@ -11,6 +11,12 @@ * @returns {Promise} 返回Promise */ async function runFFmpeg(args, options = {}) { + if (!utools.runFFmpeg) { + quickcommand.showSystemMessageBox( + "请先升级uTools到6.1.0及以上版本" + ); + return; + } const { title = "FFmpeg处理", text = "处理中...", diff --git a/src/js/composer/commands/index.js b/src/js/composer/commands/index.js index f8dcea8..46ea57d 100644 --- a/src/js/composer/commands/index.js +++ b/src/js/composer/commands/index.js @@ -21,21 +21,16 @@ import { scriptCommands } from "./scriptCommands"; import { browserCommands } from "./browserCommands"; import { videoCommands } from "./videoCommands"; -const platformCommands = { - win32: [windowsCommands], - darwin: [macosCommands], - linux: [], -}; - export const commandCategories = [ fileCommands, networkCommands, systemCommands, audioCommands, imageCommands, - ...(utools.runFFmpeg ? [videoCommands] : []), + videoCommands, utoolsCommands, - ...platformCommands[window.processPlatform], + windowsCommands, + macosCommands, browserCommands, dataCommands, codingCommands,