koishi-plugin-video-parser-all 1.0.1 → 1.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/lib/index.js +6 -1
  2. package/package.json +1 -1
package/lib/index.js CHANGED
@@ -29,7 +29,7 @@ exports.Config = koishi_1.Schema.intersect([
29
29
  videoDownloadTimeout: koishi_1.Schema.number().default(120000).description('视频下载超时(毫秒)'),
30
30
  tempDir: koishi_1.Schema.string().default('./temp_videos').description('临时视频存储目录'),
31
31
  maxVideoSize: koishi_1.Schema.number().min(0).step(1).default(0).description('最大下载视频大小(MB),0 为不限制大小'),
32
- forceDownloadVideo: koishi_1.Schema.boolean().default(true).description('强制下载视频后发送(解决部分平台URL无法直接发送的问题)'),
32
+ forceDownloadVideo: koishi_1.Schema.boolean().default(true).description('强制下载视频后发送(解决B站、小红书等平台URL无法直接发送的问题)'),
33
33
  }).description('内容显示设置'),
34
34
  koishi_1.Schema.object({
35
35
  timeout: koishi_1.Schema.number().min(0).default(180000).description('API 请求超时(毫秒)'),
@@ -668,6 +668,11 @@ function apply(ctx, config) {
668
668
  ctx.on('message', async (session) => {
669
669
  if (!config.enable)
670
670
  return;
671
+ // 修复:使用正确的小写subtype属性名
672
+ if (session.subtype === 'file_upload')
673
+ return;
674
+ if (session.elements?.some(elem => elem.type === 'file' || elem.type === 'folder'))
675
+ return;
671
676
  const urls = extractAllUrlsFromMessage(session);
672
677
  if (!urls.length)
673
678
  return;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "koishi-plugin-video-parser-all",
3
3
  "description": "Koishi 全平台视频解析插件,支持抖音/快手/B站/微博/小红书/剪映/YouTube/TikTok等20+平台",
4
- "version": "1.0.1",
4
+ "version": "1.0.2",
5
5
  "main": "lib/index.js",
6
6
  "typings": "lib/index.d.ts",
7
7
  "files": [