karin-plugin-kkk 2.45.2-beta.4 → 2.45.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,20 @@
2
2
 
3
3
  # Changelog
4
4
 
5
+ ## [2.45.3](https://github.com/ikenxuan/karin-plugin-kkk/compare/v2.45.2...v2.45.3) (2026-11-11)
6
+
7
+
8
+ ### 🧰 其他更新
9
+
10
+ * 更新命令正则,支持「#订阅xx推送」 ([b342faa](https://github.com/ikenxuan/karin-plugin-kkk/commit/b342faa0b074ebe775feeac50abdc65474b0bed7))
11
+
12
+ ## [2.45.2](https://github.com/ikenxuan/karin-plugin-kkk/compare/v2.45.1...v2.45.2) (2026-10-30)
13
+
14
+
15
+ ### 🐛 错误修复
16
+
17
+ * 修复部分版权番剧缺少 up_info 时海报渲染失败 ([8480cec](https://github.com/ikenxuan/karin-plugin-kkk/commit/8480cecec639db79eaad1c74e7c1e4a1533eda20))
18
+
5
19
  ## [2.45.2-beta.4](https://github.com/ikenxuan/karin-plugin-kkk/compare/v2.45.2-beta.3...v2.45.2-beta.4) (2026-10-30)
6
20
 
7
21
 
@@ -1,10 +1,10 @@
1
1
  {
2
- "version": "2.45.2-beta.4",
3
- "buildTime": "2026-10-30T04:20:27.192Z",
4
- "buildTimestamp": 1793334027192,
2
+ "version": "2.45.3",
3
+ "buildTime": "2026-11-11T13:06:50.218Z",
4
+ "buildTimestamp": 1794402410218,
5
5
  "name": "karin-plugin-kkk",
6
6
  "description": "Karin 的「抖音」「B 站」视频解析/动态推送插件",
7
7
  "homepage": "https://github.com/ikenxuan/karin-plugin-kkk",
8
- "commitHash": "29f57d7182fc227b406d28ea2d60551096586588",
9
- "shortCommitHash": "29f57d71"
8
+ "commitHash": "e97c1c8b6da19d6e8159f2314ab2c87e888c265e",
9
+ "shortCommitHash": "e97c1c8b"
10
10
  }
@@ -12002,6 +12002,21 @@ var parseCredits = (raw) => {
12002
12002
  voiceCount: (/* @__PURE__ */ new Set([...cast.map((item) => item.actor), ...extras])).size
12003
12003
  };
12004
12004
  };
12005
+ /** staff 上游偶尔缺换行,把下一个职务粘在公司名后面(如「SUNRISE舞台设定」),截掉常见职务后缀 */
12006
+ var GLUED_STAFF_ROLE = /(总作画监督|作画监督|美术监督|摄影监督|音响监督|系列构成|舞台设定|人物设定|角色设定|人物设计|角色设计|色彩设计|制作人|制片人|监督|导演|脚本|编剧|分镜|演出|编集|编辑|企划|设定|设计)$/;
12007
+ /** 版权番剧没有 up_info 时,从制作人员里取制作公司:优先「动画制作」,其次「制作/製作」 */
12008
+ var parseMaker = (raw) => {
12009
+ let fallback = "";
12010
+ for (const line of (raw || "").split(/\r?\n/)) {
12011
+ const match = /^\s*(动画制作公司|动画制作|制作公司|制作|製作)[::]\s*(.+?)\s*$/.exec(line);
12012
+ if (!match) continue;
12013
+ const name = match[2].replace(GLUED_STAFF_ROLE, "").trim();
12014
+ if (!name) continue;
12015
+ if (/动画制作/.test(match[1])) return name;
12016
+ if (!fallback) fallback = name;
12017
+ }
12018
+ return fallback;
12019
+ };
12005
12020
  /** 发布日期统一写成 2026.10.24,等宽数字列对齐,跨年也不歧义 */
12006
12021
  var formatPubDate = (seconds) => seconds > 0 ? format(/* @__PURE__ */ new Date(seconds * 1e3), "yyyy.MM.dd") : "";
12007
12022
  /** 按展示顺序(最新在前)写区间;只有一集时写「第 a 集」 */
@@ -12519,16 +12534,19 @@ var EpisodeGrid$1 = ({ items, dark, isLastPage, pageCount, listed, mode }) => {
12519
12534
  });
12520
12535
  };
12521
12536
  /** 版权栏:左侧列出数量、UP 主与 season 号,右侧生成时间 */
12522
- var Colophon$1 = ({ notes }) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("footer", {
12523
- className: "flex items-start justify-between gap-10 pt-7 text-[24px] leading-relaxed text-foreground/65",
12524
- children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
12525
- className: "min-w-0",
12526
- children: notes.join(" · ")
12527
- }), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
12528
- className: "shrink-0 select-text",
12529
- children: ["图片生成于: ", format(/* @__PURE__ */ new Date(), "yyyy-MM-dd HH:mm:ss")]
12530
- })]
12531
- });
12537
+ var Colophon$1 = ({ notes }) => {
12538
+ const [generatedAt] = import_react.useState(() => format(/* @__PURE__ */ new Date(), "yyyy-MM-dd HH:mm:ss"));
12539
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("footer", {
12540
+ className: "flex items-start justify-between gap-10 pt-7 text-[24px] leading-relaxed text-foreground/65",
12541
+ children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
12542
+ className: "min-w-0",
12543
+ children: notes.join(" · ")
12544
+ }), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
12545
+ className: "shrink-0 select-text",
12546
+ children: ["图片生成于: ", generatedAt]
12547
+ })]
12548
+ });
12549
+ };
12532
12550
  var BangumiBilibili = import_react.memo((props) => {
12533
12551
  const { data, ctx } = props;
12534
12552
  const dark = isDark(ctx);
@@ -12566,9 +12584,11 @@ var BangumiBilibili = import_react.memo((props) => {
12566
12584
  ...splitCount$1(data.Stat.coins)
12567
12585
  }
12568
12586
  ];
12587
+ const maker = data.UPInfo ? "" : parseMaker(data.Staff ?? "");
12588
+ const upNote = data.UPInfo ? `UP 主 ${data.UPInfo.uname} · 粉丝 ${Object.values(splitCount$1(data.UPInfo.follower)).join("")}` : [maker && `制作 ${maker}`, data.Stat.follow_text].filter(Boolean).join(" · ");
12569
12589
  const notes = [
12570
12590
  `已列出 ${numbered.length} 集`,
12571
- `UP 主 ${data.UPInfo.uname} · 粉丝 ${Object.values(splitCount$1(data.UPInfo.follower)).join("")}`,
12591
+ ...upNote ? [upNote] : [],
12572
12592
  ...data.seasonID ? [`ss${data.seasonID}`] : []
12573
12593
  ];
12574
12594
  return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(DefaultLayout, {
@@ -19529,16 +19549,19 @@ var EpisodeGrid = ({ episodes, isPlaylet, isLastPage, pageCount, listed, mode })
19529
19549
  });
19530
19550
  };
19531
19551
  /** 版权栏:左侧列出数量与缺集说明,右侧生成时间 */
19532
- var Colophon = ({ notes }) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("footer", {
19533
- className: "flex items-start justify-between gap-10 pt-7 text-[24px] leading-relaxed text-foreground/65",
19534
- children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
19535
- className: "min-w-0",
19536
- children: notes.join(" · ")
19537
- }), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
19538
- className: "shrink-0 select-text",
19539
- children: ["图片生成于: ", format(/* @__PURE__ */ new Date(), "yyyy-MM-dd HH:mm:ss")]
19540
- })]
19541
- });
19552
+ var Colophon = ({ notes }) => {
19553
+ const [generatedAt] = import_react.useState(() => format(/* @__PURE__ */ new Date(), "yyyy-MM-dd HH:mm:ss"));
19554
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("footer", {
19555
+ className: "flex items-start justify-between gap-10 pt-7 text-[24px] leading-relaxed text-foreground/65",
19556
+ children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
19557
+ className: "min-w-0",
19558
+ children: notes.join(" · ")
19559
+ }), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
19560
+ className: "shrink-0 select-text",
19561
+ children: ["图片生成于: ", generatedAt]
19562
+ })]
19563
+ });
19564
+ };
19542
19565
  var DouyinMix = import_react.memo((props) => {
19543
19566
  const { data, ctx } = props;
19544
19567
  const isPlaylet = data.kind === "playlet";
@@ -32839,6 +32862,7 @@ var Bilibili = class extends Base {
32839
32862
  seasonID: videoInfo.data.result.season_id,
32840
32863
  subtitle: videoInfo.data.result.subtitle,
32841
32864
  UPInfo: videoInfo.data.result.up_info,
32865
+ Staff: videoInfo.data.result.staff,
32842
32866
  Copyright: videoInfo.data.result.rights.copyright,
32843
32867
  Stat: videoInfo.data.result.stat,
32844
32868
  Episodes: displayEpisodes,
@@ -39741,7 +39765,7 @@ var DouYinpush = class extends Base {
39741
39765
  const groupId = "groupId" in this.e && this.e.groupId ? this.e.groupId : "";
39742
39766
  const botId = this.e.selfId;
39743
39767
  try {
39744
- const inputDouyinId = this.e.msg.replace(/^#设置抖音推送/, "").trim();
39768
+ const inputDouyinId = this.e.msg.replace(/^#(?:设置|订阅)抖音推送/, "").trim();
39745
39769
  /** 处理抖音号 */
39746
39770
  const user_shortid = data.user_info.unique_id === "" ? data.user_info.short_id : data.user_info.unique_id;
39747
39771
  const sec_uid = data.user_info.sec_uid;
@@ -41656,12 +41680,12 @@ var HELP_MENU_CONFIG = [
41656
41680
  subGroups: [{
41657
41681
  title: "在群聊中再发送一次即可取消订阅",
41658
41682
  items: [{
41659
- title: "#设置抖音推送 + 抖音号",
41683
+ title: "#设置/订阅抖音推送 + 抖音号",
41660
41684
  description: "在群聊中发送以对该群订阅该抖音博主的作品更新",
41661
41685
  icon: "ph:bell-fill",
41662
41686
  roles: Config.douyin.push.permission === "all" ? ["member", "master"] : ["master"]
41663
41687
  }, {
41664
- title: "#设置B站推送 + UP主UID",
41688
+ title: "#设置/订阅B站推送 + UID",
41665
41689
  description: "在群聊中发送以对该群订阅该B站UP主的稿件/动态更新",
41666
41690
  icon: "ph:bell-fill",
41667
41691
  roles: Config.bilibili.push.permission === "all" ? ["member", "master"] : ["master"]
@@ -41792,7 +41816,7 @@ var handleForcePush = wrapWithErrorHandler(async (e) => {
41792
41816
  return true;
41793
41817
  }, { businessName: "强制推送" });
41794
41818
  var handleSetDouyinPush = wrapWithErrorHandler(async (e) => {
41795
- const query = e.msg.replace(/^#设置抖音推送/, "").trim();
41819
+ const query = e.msg.replace(/^#(?:设置|订阅)抖音推送/, "").trim();
41796
41820
  if (query === "开启" || query === "关闭") {
41797
41821
  const enable = query === "开启";
41798
41822
  Config.Modify("douyin", "push.switch", enable);
@@ -41805,7 +41829,7 @@ var handleSetDouyinPush = wrapWithErrorHandler(async (e) => {
41805
41829
  return true;
41806
41830
  }, { businessName: "设置抖音推送" });
41807
41831
  var handleSetBilibiliPush = wrapWithErrorHandler(async (e) => {
41808
- const query = e.msg.replace(/^#设置[bB]站推送/, "").replace(/^(?:[Uu][Ii][Dd]:)?/, "").trim();
41832
+ const query = e.msg.replace(/^#(?:设置|订阅)[bB]站推送/, "").replace(/^(?:[Uu][Ii][Dd]:)?/, "").trim();
41809
41833
  if (query === "开启" || query === "关闭") {
41810
41834
  const enable = query === "开启";
41811
41835
  Config.Modify("bilibili", "push.switch", enable);
@@ -41903,12 +41927,12 @@ var forcePush = karin.command(/#(抖音|B站)(全部)?强制推送/, handleForce
41903
41927
  perm: "master",
41904
41928
  event: "message.group"
41905
41929
  });
41906
- var setdyPush = karin.command(/^#设置抖音推送/, handleSetDouyinPush, {
41930
+ var setdyPush = karin.command(/^#(?:设置|订阅)抖音推送/, handleSetDouyinPush, {
41907
41931
  name: "kkk-推送功能-设置",
41908
41932
  event: "message.group",
41909
41933
  perm: Config.douyin.push.permission
41910
41934
  });
41911
- var setbiliPush = karin.command(/^#设置[bB]站推送/, handleSetBilibiliPush, {
41935
+ var setbiliPush = karin.command(/^#(?:设置|订阅)[bB]站推送/, handleSetBilibiliPush, {
41912
41936
  name: "kkk-推送功能-设置",
41913
41937
  event: "message.group",
41914
41938
  perm: Config.bilibili.push.permission
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "karin-plugin-kkk",
3
- "version": "2.45.2-beta.4",
3
+ "version": "2.45.3",
4
4
  "description": "Karin 的「抖音」「B 站」视频解析/动态推送插件",
5
5
  "keywords": [
6
6
  "karin",
@@ -83,7 +83,7 @@
83
83
  "@lobehub/webfont-harmony-sans-sc": "^1.0.0",
84
84
  "emoji-datasource-apple": "16.0.0"
85
85
  },
86
- "timestamp": "2026-10-30T04:19:15.528Z",
86
+ "timestamp": "2026-11-11T13:06:11.606Z",
87
87
  "engines": {
88
88
  "node": ">=18.0.0"
89
89
  }