karin-plugin-kkk 2.45.2-beta.2 → 2.45.2-beta.3

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.
package/CHANGELOG.md CHANGED
@@ -2,6 +2,14 @@
2
2
 
3
3
  # Changelog
4
4
 
5
+ ## [2.45.2-beta.3](https://github.com/ikenxuan/karin-plugin-kkk/compare/v2.45.2-beta.2...v2.45.2-beta.3) (2026-10-27)
6
+
7
+
8
+ ### 🐛 错误修复
9
+
10
+ * 更新 @ikenxuan/qrcode 依赖至 1.8.1,优化短链接生成逻辑 ([090152d](https://github.com/ikenxuan/karin-plugin-kkk/commit/090152d903e4aeecc019252ea349415e3029b068))
11
+ * **douyin:** 优化短剧和普通合集的回复标题逻辑 ([e693205](https://github.com/ikenxuan/karin-plugin-kkk/commit/e693205882e7c1d16e76654c31d95d9c8e736a18))
12
+
5
13
  ## [2.45.2-beta.2](https://github.com/ikenxuan/karin-plugin-kkk/compare/v2.45.2-beta.1...v2.45.2-beta.2) (2026-10-27)
6
14
 
7
15
 
@@ -1,10 +1,10 @@
1
1
  {
2
- "version": "2.45.2-beta.2",
3
- "buildTime": "2026-10-27T04:52:51.849Z",
4
- "buildTimestamp": 1793076771850,
2
+ "version": "2.45.2-beta.3",
3
+ "buildTime": "2026-10-27T15:37:31.097Z",
4
+ "buildTimestamp": 1793115451097,
5
5
  "name": "karin-plugin-kkk",
6
6
  "description": "Karin 的「抖音」「B 站」视频解析/动态推送插件",
7
7
  "homepage": "https://github.com/ikenxuan/karin-plugin-kkk",
8
- "commitHash": "f5d85bd25f4d9a4b83e464867b42fc588e6c8182",
9
- "shortCommitHash": "f5d85bd2"
8
+ "commitHash": "43958528c532e620b2b30583923e595e2791e57b",
9
+ "shortCommitHash": "43958528"
10
10
  }
@@ -37057,6 +37057,26 @@ async function renderLiveImage(options) {
37057
37057
  });
37058
37058
  }
37059
37059
  //#endregion
37060
+ //#region src/platform/douyin/shortUrl.ts
37061
+ /**
37062
+ * 把分享链接换成抖音签发的 `v.douyin.com` 短链(二维码专用)。
37063
+ *
37064
+ * 短链由 amagi 的 `douyin.shortUrl` 端点签发:同一 target 恒得同一短码,
37065
+ * 内容比任何规范链接都短,能明显降低二维码密度。该端点免登录但仍要 `a_bogus` 签名,
37066
+ * 可能因签名或平台策略失败 —— 失败不阻塞推送,回退原链接即可。
37067
+ * @param target - 待缩短的分享链接(规范链接或视频直链均可)
37068
+ * @returns 短链;签发失败时原样返回 target
37069
+ */
37070
+ var toDouyinShortUrl = async (target) => {
37071
+ try {
37072
+ const shortUrl = (await douyinFetcher.fetchShortUrl({ target })).data?.data;
37073
+ return typeof shortUrl === "string" && shortUrl.length > 0 ? shortUrl : target;
37074
+ } catch (error) {
37075
+ logger$1.debug(`[抖音短链] 签发失败,二维码回退原链接:${error instanceof Error ? error.message : String(error)}`);
37076
+ return target;
37077
+ }
37078
+ };
37079
+ //#endregion
37060
37080
  //#region src/platform/douyin/types.ts
37061
37081
  /**
37062
37082
  * 把 amagi 返回的 aweme 对象装配成渲染/推送使用的作品详情。
@@ -37503,7 +37523,7 @@ var DouYin = class DouYin extends Base {
37503
37523
  } else {
37504
37524
  const aweme = VideoData.data.aweme_detail;
37505
37525
  const userProfile = await this.amagi.douyin.fetcher.fetchUserProfile({ sec_uid: aweme.author.sec_uid });
37506
- const shareLink = isVideo && selectedVideo ? buildDouyinPlayUrl(selectedVideo.play_addr) : `https://www.douyin.com/${isArticle ? "article" : "note"}/${aweme.aweme_id}`;
37526
+ const shareLink = await toDouyinShortUrl(isVideo && selectedVideo ? buildDouyinPlayUrl(selectedVideo.play_addr) : `https://www.douyin.com/${isArticle ? "article" : "note"}/${aweme.aweme_id}`);
37507
37527
  const workInfoImg = await renderWorkImage({
37508
37528
  e: this.e,
37509
37529
  Detail_Data: buildDouyinWorkDetail(aweme, { user_info: userProfile.data }),
@@ -37531,7 +37551,7 @@ var DouYin = class DouYin extends Base {
37531
37551
  Type: isArticle ? "文章" : isVideo ? "视频" : this.is_slides ? "合辑" : "图集",
37532
37552
  CommentsData: douyinCommentsRes.CommentsData,
37533
37553
  CommentLength: douyinCommentsRes.CommentsData.length ?? 0,
37534
- share_url: isVideo && selectedVideo ? buildDouyinPlayUrl(selectedVideo.play_addr) : `https://www.douyin.com/${isArticle ? "article" : "note"}/${aweme.aweme_id}`,
37554
+ share_url: await toDouyinShortUrl(isVideo && selectedVideo ? buildDouyinPlayUrl(selectedVideo.play_addr) : `https://www.douyin.com/${isArticle ? "article" : "note"}/${aweme.aweme_id}`),
37535
37555
  VideoSize: mp4size,
37536
37556
  VideoFPS: FPS,
37537
37557
  ImageLength: imagenum,
@@ -37839,7 +37859,8 @@ var DouYin = class DouYin extends Base {
37839
37859
  await this.e.reply(episode === null ? "匹配内容失败,请发送 第?集 选择集数,或发送 上一页 / 下一页 / 第?页 翻页" : `第${episode}集不在可解析的剧集里,请重新选择`);
37840
37860
  continue;
37841
37861
  }
37842
- await this.e.reply(`收到请求,第${episode}集\n${mixInfo.mix_name}\n正在解析中`);
37862
+ const episodeTitle = (isPlaylet ? mixInfo.mix_name : target.title || mixInfo.mix_name).replace(/\s+/g, " ").trim();
37863
+ await this.e.reply(`收到请求,第${episode}集\n${episodeTitle}\n正在解析中`);
37843
37864
  const targetData = {
37844
37865
  type: "one_work",
37845
37866
  aweme_id: target.aweme_id
@@ -38305,26 +38326,6 @@ async function processRecommendList(contentList, sec_uid, userinfo, item, target
38305
38326
  return result;
38306
38327
  }
38307
38328
  //#endregion
38308
- //#region src/platform/douyin/shortUrl.ts
38309
- /**
38310
- * 把分享链接换成抖音签发的 `v.douyin.com` 短链(二维码专用)。
38311
- *
38312
- * 短链由 amagi 的 `douyin.shortUrl` 端点签发:同一 target 恒得同一短码,
38313
- * 内容比任何规范链接都短,能明显降低二维码密度。该端点免登录但仍要 `a_bogus` 签名,
38314
- * 可能因签名或平台策略失败 —— 失败不阻塞推送,回退原链接即可。
38315
- * @param target - 待缩短的分享链接(规范链接或视频直链均可)
38316
- * @returns 短链;签发失败时原样返回 target
38317
- */
38318
- var toDouyinShortUrl = async (target) => {
38319
- try {
38320
- const shortUrl = (await douyinFetcher.fetchShortUrl({ target })).data?.data;
38321
- return typeof shortUrl === "string" && shortUrl.length > 0 ? shortUrl : target;
38322
- } catch (error) {
38323
- logger$1.debug(`[抖音短链] 签发失败,二维码回退原链接:${error instanceof Error ? error.message : String(error)}`);
38324
- return target;
38325
- }
38326
- };
38327
- //#endregion
38328
38329
  //#region src/platform/douyin/push.ts
38329
38330
  var douyinBaseHeaders = {
38330
38331
  ...BASE_HEADERS,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "karin-plugin-kkk",
3
- "version": "2.45.2-beta.2",
3
+ "version": "2.45.2-beta.3",
4
4
  "description": "Karin 的「抖音」「B 站」视频解析/动态推送插件",
5
5
  "keywords": [
6
6
  "karin",
@@ -78,12 +78,12 @@
78
78
  "ts-web": "./src/web.config.ts"
79
79
  },
80
80
  "dependencies": {
81
- "@ikenxuan/qrcode": "1.6.0",
81
+ "@ikenxuan/qrcode": "1.8.1",
82
82
  "@lobehub/webfont-geist-mono": "^1.0.0",
83
83
  "@lobehub/webfont-harmony-sans-sc": "^1.0.0",
84
84
  "emoji-datasource-apple": "16.0.0"
85
85
  },
86
- "timestamp": "2026-10-27T04:52:14.903Z",
86
+ "timestamp": "2026-10-27T15:36:05.738Z",
87
87
  "engines": {
88
88
  "node": ">=18.0.0"
89
89
  }