feat: 群相册支持多图同批次上传与视频上传,分片上传改为并发 (#2081)

- 新增 upload_images_to_qun_album:多张图片共用一个批次,相册里显示为同一条
- 新增 upload_video_to_qun_album:上传视频并自动抽取首帧作为封面
- 分片大小改用服务端返回的 slice_size,分片并发上传,最后一片等其它分片传完再发
- 摘要改为流式计算,分片按需读取,不再把整个文件读进内存
- 批次号同一秒内递增,避免两次上传被并成一条
This commit is contained in:
xboHodx authored and GitHub committed 2026-10-05 13:21:38 +08:00
1 parent c0fd089539
commit a8f6a57311
12 files changed
+913 -87

No files matched your search

+3 -1
View File
@@ -1,4 +1,5 @@
import { describe, expect, test } from 'vitest';
import type { GeneralCallResultStatus } from '../napcat-core/services/common';
import {
applyGroupManagementSettings,
createGroupDetailInfoV2Param,
@@ -10,7 +11,8 @@ describe('NTQQ group operations', () => {
test('reports the exact native setting that failed', () => {
expect(() => assertGroupManagementResults('设置群成员功能权限', [{
setting: 'allow_member_create_group',
result: { result: 1006, errMsg: '未知错误' },
// 枚举里只有 OK/ERROR,这里刻意用一个任意的原生错误码
result: { result: 1006 as GeneralCallResultStatus, errMsg: '未知错误' },
}])).toThrow(/allow_member_create_group.*1006.*未知错误/);
expect(() => assertGroupManagementResults('设置群成员功能权限', []))
.not.toThrow();