release: v2.4.9

This commit is contained in:
手瓜一十雪
2024-09-12 19:47:57 +08:00
parent 46e56ac726
commit edf80775b7
7 changed files with 15 additions and 6 deletions

View File

@@ -147,7 +147,15 @@ export class NTQQFileApi {
} catch (e) {
logger.logError('获取视频信息失败,将使用默认值', e);
}
const newFilePath = filePath + '.mp4';
let fileExt = 'mp4'
try {
let tempExt = (await fileType.fileTypeFromFile(filePath))?.ext;
if (tempExt) fileExt = tempExt;
} catch (e) {
this.context.logger.logError('获取文件类型失败', e);
}
const newFilePath = filePath + '.'+fileExt;
fs.copyFileSync(filePath, newFilePath);
context.deleteAfterSentFiles.push(newFilePath);
filePath = newFilePath;