koishi-plugin-video-parser-all 1.5.3 → 1.5.4

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 +8 -4
  2. package/package.json +1 -1
package/lib/index.js CHANGED
@@ -1136,14 +1136,16 @@ function apply(ctx, config) {
1136
1136
  if (config.showAuthorAvatar && p.avatar && config.showAuthorAvatarText) {
1137
1137
  text = text ? text + '\n' + (config.authorAvatarText || '作者头像:') : (config.authorAvatarText || '作者头像:');
1138
1138
  }
1139
- if (text && config.showImageText)
1139
+ if (text && config.showImageText) {
1140
1140
  forwardMessages.push(buildForwardNode(session, text, botName));
1141
+ }
1141
1142
  if (config.showAuthorAvatar && p.avatar) {
1142
1143
  forwardMessages.push(buildForwardNode(session, koishi_1.h.image(p.avatar), botName));
1143
1144
  }
1144
1145
  if (p.cover && config.showCoverImage && p.type !== 'live_photo' && p.type !== 'image' && p.type !== 'live') {
1145
- if (config.showCoverText)
1146
+ if (config.showCoverText) {
1146
1147
  forwardMessages.push(buildForwardNode(session, config.coverText || '封面:', botName));
1148
+ }
1147
1149
  forwardMessages.push(buildForwardNode(session, koishi_1.h.image(p.cover), botName));
1148
1150
  }
1149
1151
  if (config.showMusicCover && p.music.cover) {
@@ -1151,11 +1153,13 @@ function apply(ctx, config) {
1151
1153
  }
1152
1154
  if (p.type === 'image' || p.type === 'live_photo' || (p.type === 'live' && (p.live_photo?.length || p.images?.length))) {
1153
1155
  const imageUrls = p.images?.length ? p.images : (p.live_photo?.map(lp => lp.image) ?? []);
1154
- for (const imgUrl of imageUrls)
1156
+ for (const imgUrl of imageUrls) {
1155
1157
  forwardMessages.push(buildForwardNode(session, koishi_1.h.image(imgUrl), botName));
1158
+ }
1156
1159
  }
1157
- if (p.video && p.type !== 'live')
1160
+ if (p.video && p.type !== 'live') {
1158
1161
  forwardMessages.push(buildForwardNode(session, koishi_1.h.video(p.video), botName));
1162
+ }
1159
1163
  if (config.showMusicVoice && p.music.url) {
1160
1164
  forwardMessages.push(buildForwardNode(session, koishi_1.h.audio(p.music.url), botName));
1161
1165
  }
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.5.3",
4
+ "version": "1.5.4",
5
5
  "main": "lib/index.js",
6
6
  "typings": "lib/index.d.ts",
7
7
  "files": [