style: lint

This commit is contained in:
手瓜一十雪
2024-08-26 00:01:44 +08:00
parent f2c69fc68b
commit edc787eb3e

View File

@@ -159,7 +159,6 @@ export class NTQQFileApi {
} }
let thumb = path.replace(`${pathLib.sep}Ori${pathLib.sep}`, `${pathLib.sep}Thumb${pathLib.sep}`); let thumb = path.replace(`${pathLib.sep}Ori${pathLib.sep}`, `${pathLib.sep}Thumb${pathLib.sep}`);
thumb = pathLib.dirname(thumb); thumb = pathLib.dirname(thumb);
// log("thumb 目录", thumb)
let videoInfo = { let videoInfo = {
width: 1920, height: 1080, width: 1920, height: 1080,
time: 15, time: 15,
@@ -169,7 +168,6 @@ export class NTQQFileApi {
}; };
try { try {
videoInfo = await getVideoInfo(path, logger); videoInfo = await getVideoInfo(path, logger);
//logDebug('视频信息', videoInfo);
} catch (e) { } catch (e) {
logger.logError('获取视频信息失败', e); logger.logError('获取视频信息失败', e);
} }
@@ -253,11 +251,11 @@ export class NTQQFileApi {
path: silkPath, path: silkPath,
duration, duration,
} = await encodeSilk(pttPath, this.core.NapCatTempPath, this.core.context.logger); } = await encodeSilk(pttPath, this.core.NapCatTempPath, this.core.context.logger);
// log("生成语音", silkPath, duration); // 生成语音 Path: silkPath Time: duration
if (!silkPath) { if (!silkPath) {
throw '语音转换失败, 请检查语音文件是否正常'; throw '语音转换失败, 请检查语音文件是否正常';
} }
const { md5, fileName, path, fileSize } = await this.core.apis.FileApi.uploadFile(silkPath!, ElementType.PTT); const { md5, fileName, path, fileSize } = await this.core.apis.FileApi.uploadFile(silkPath, ElementType.PTT);
if (fileSize === 0) { if (fileSize === 0) {
throw '文件异常大小为0'; throw '文件异常大小为0';
} }