fix: 自动化验证环境变量的ffmpeg

This commit is contained in:
手瓜一十雪
2025-04-17 17:59:06 +08:00
parent 8fbd7aec53
commit 03444d1de6
4 changed files with 58 additions and 15 deletions

View File

@@ -313,9 +313,9 @@ export async function NCoreInitShell() {
const pathWrapper = new NapCatPathWrapper();
const logger = new LogWrapper(pathWrapper.logsPath);
handleUncaughtExceptions(logger);
downloadFFmpegIfNotExists(logger).then(({ path, isExist }) => {
if (!isExist && path) {
FFmpegService.setFfmpegPath(path);
downloadFFmpegIfNotExists(logger).then(({ path, reset }) => {
if (reset && path) {
FFmpegService.setFfmpegPath(path,logger);
}
}).catch(e => {
logger.logError('[Ffmpeg] Error:', e);