koishi-plugin-bilibili-videolink-analysis 1.1.1 → 1.1.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.
- package/lib/index.js +7 -6
- package/package.json +1 -1
package/lib/index.js
CHANGED
|
@@ -446,7 +446,7 @@ display: none !important;
|
|
|
446
446
|
|
|
447
447
|
// 如果开启了日志调试模式,打印用户选择的视频信息
|
|
448
448
|
if (config.loggerinfo) {
|
|
449
|
-
ctx.logger.info(`渲染序号设置\noverlay.style.top = ${config.point[0]}% \noverlay.style.left = ${config.point[1]}
|
|
449
|
+
ctx.logger.info(`渲染序号设置\noverlay.style.top = ${config.point[0]}% \noverlay.style.left = ${config.point[1]}%`)
|
|
450
450
|
ctx.logger.info(`用户选择了序号 ${choiceIndex + 1}: ID - ${chosenVideo.id}`)
|
|
451
451
|
}
|
|
452
452
|
|
|
@@ -599,9 +599,9 @@ display: none !important;
|
|
|
599
599
|
const { bvid, cid, video } = responseData.data;
|
|
600
600
|
const bilibiliUrl = `https://api.bilibili.com/x/player/playurl?fnval=80&cid=${cid}&bvid=${bvid}`;
|
|
601
601
|
const playData = await ctx.http.get(bilibiliUrl);
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
602
|
+
if (config.loggerinfo) {
|
|
603
|
+
ctx.logger.info(bilibiliUrl);
|
|
604
|
+
}
|
|
605
605
|
if (playData.code === 0 && playData.data && playData.data.dash.duration) {
|
|
606
606
|
const videoDurationSeconds = playData.data.dash.duration;
|
|
607
607
|
const videoDurationMinutes = videoDurationSeconds / 60;
|
|
@@ -616,8 +616,9 @@ display: none !important;
|
|
|
616
616
|
}
|
|
617
617
|
|
|
618
618
|
const videoUrl = video.url;
|
|
619
|
-
|
|
620
|
-
|
|
619
|
+
if (config.loggerinfo) {
|
|
620
|
+
ctx.logger.info(videoUrl);
|
|
621
|
+
}
|
|
621
622
|
if (videoUrl) {
|
|
622
623
|
if (options.link) {
|
|
623
624
|
await session.send(h.text(videoUrl));
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "koishi-plugin-bilibili-videolink-analysis",
|
|
3
3
|
"description": "[<ruby>Bilibili视频解析<rp>(</rp><rt>点我查看食用方法</rt><rp>)</rp></ruby>](https://www.npmjs.com/package/koishi-plugin-bilibili-videolink-analysis)解析B站链接(支持小程序卡片)支持搜索点播功能!灵感来自完美的 [bili-parser](/market?keyword=bili-parser) !",
|
|
4
4
|
"license": "MIT",
|
|
5
|
-
"version": "1.1.
|
|
5
|
+
"version": "1.1.2",
|
|
6
6
|
"main": "lib/index.js",
|
|
7
7
|
"typings": "lib/index.d.ts",
|
|
8
8
|
"files": [
|