mirror of
https://github.com/NapNeko/NapCatQQ.git
synced 2025-07-19 12:03:37 +00:00
feat: 支持环境变量禁用ffmpeg下载支持
This commit is contained in:
@@ -38,13 +38,15 @@ export async function NCoreInitFramework(
|
|||||||
const logger = new LogWrapper(pathWrapper.logsPath);
|
const logger = new LogWrapper(pathWrapper.logsPath);
|
||||||
const basicInfoWrapper = new QQBasicInfoWrapper({ logger });
|
const basicInfoWrapper = new QQBasicInfoWrapper({ logger });
|
||||||
const wrapper = loadQQWrapper(basicInfoWrapper.getFullQQVesion());
|
const wrapper = loadQQWrapper(basicInfoWrapper.getFullQQVesion());
|
||||||
downloadFFmpegIfNotExists(logger).then(({ path, reset }) => {
|
if (!process.env['NAPCAT_DISABLE_FFMPEG_DOWNLOAD']) {
|
||||||
if (reset && path) {
|
downloadFFmpegIfNotExists(logger).then(({ path, reset }) => {
|
||||||
FFmpegService.setFfmpegPath(path,logger);
|
if (reset && path) {
|
||||||
}
|
FFmpegService.setFfmpegPath(path, logger);
|
||||||
}).catch(e => {
|
}
|
||||||
logger.logError('[Ffmpeg] Error:', e);
|
}).catch(e => {
|
||||||
});
|
logger.logError('[Ffmpeg] Error:', e);
|
||||||
|
});
|
||||||
|
}
|
||||||
//直到登录成功后,执行下一步
|
//直到登录成功后,执行下一步
|
||||||
const selfInfo = await new Promise<SelfInfo>((resolveSelfInfo) => {
|
const selfInfo = await new Promise<SelfInfo>((resolveSelfInfo) => {
|
||||||
const loginListener = new NodeIKernelLoginListener();
|
const loginListener = new NodeIKernelLoginListener();
|
||||||
|
@@ -314,13 +314,15 @@ export async function NCoreInitShell() {
|
|||||||
const logger = new LogWrapper(pathWrapper.logsPath);
|
const logger = new LogWrapper(pathWrapper.logsPath);
|
||||||
handleUncaughtExceptions(logger);
|
handleUncaughtExceptions(logger);
|
||||||
await connectToNamedPipe(logger).catch(e => logger.logError('命名管道连接失败', e));
|
await connectToNamedPipe(logger).catch(e => logger.logError('命名管道连接失败', e));
|
||||||
downloadFFmpegIfNotExists(logger).then(({ path, reset }) => {
|
if (!process.env['NAPCAT_DISABLE_FFMPEG_DOWNLOAD']) {
|
||||||
if (reset && path) {
|
downloadFFmpegIfNotExists(logger).then(({ path, reset }) => {
|
||||||
FFmpegService.setFfmpegPath(path, logger);
|
if (reset && path) {
|
||||||
}
|
FFmpegService.setFfmpegPath(path, logger);
|
||||||
}).catch(e => {
|
}
|
||||||
logger.logError('[Ffmpeg] Error:', e);
|
}).catch(e => {
|
||||||
});
|
logger.logError('[Ffmpeg] Error:', e);
|
||||||
|
});
|
||||||
|
}
|
||||||
const basicInfoWrapper = new QQBasicInfoWrapper({ logger });
|
const basicInfoWrapper = new QQBasicInfoWrapper({ logger });
|
||||||
const wrapper = loadQQWrapper(basicInfoWrapper.getFullQQVesion());
|
const wrapper = loadQQWrapper(basicInfoWrapper.getFullQQVesion());
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user