release: v2.4.9
Build Release / check-version (push) Canceled after 0s
Build Release / Build-LiteLoader (push) Canceled after 0s
Build Release / Build-Shell (push) Canceled after 0s
Build Release / release-napcat (push) Canceled after 0s

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

No files matched your search

+9 -1
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;