mirror of
https://github.com/Jerryplusy/rc-plugin.git
synced 2025-10-14 08:09:19 +00:00
✨ feat: 增强哔哩哔哩视频信息显示功能
- 在 guoba.support.js 中新增哔哩哔哩视频总结显示选项 - 在 config/tools.yaml 中添加哔哩哔哩显示总结配置项 - 在 apps/tools.js 中实现哔哩哔哩视频总结动态构建与显示逻辑 - 优化哔哩哔哩视频信息获取逻辑,确保信息展示的一致性和准确性 - 移除冗余的总结信息代码段,提高代码的整洁性和可维护性
This commit is contained in:
parent
f4b20ba2bf
commit
ad385e1160
@ -242,6 +242,8 @@ export class tools extends plugin {
|
|||||||
this.biliDisplayIntro = this.toolsConfig.biliDisplayIntro;
|
this.biliDisplayIntro = this.toolsConfig.biliDisplayIntro;
|
||||||
// 加载是否显示哔哩哔哩的在线人数
|
// 加载是否显示哔哩哔哩的在线人数
|
||||||
this.biliDisplayOnline = this.toolsConfig.biliDisplayOnline;
|
this.biliDisplayOnline = this.toolsConfig.biliDisplayOnline;
|
||||||
|
// 加载是否显示哔哩哔哩的总结
|
||||||
|
this.biliDisplaySummary = this.toolsConfig.biliDisplaySummary;
|
||||||
// 加载哔哩哔哩是否使用BBDown
|
// 加载哔哩哔哩是否使用BBDown
|
||||||
this.biliUseBBDown = this.toolsConfig.biliUseBBDown;
|
this.biliUseBBDown = this.toolsConfig.biliUseBBDown;
|
||||||
// 加载 BBDown 的CDN配置
|
// 加载 BBDown 的CDN配置
|
||||||
@ -591,21 +593,18 @@ export class tools extends plugin {
|
|||||||
// 动态构造哔哩哔哩信息
|
// 动态构造哔哩哔哩信息
|
||||||
let biliInfo = await this.constructBiliInfo(videoInfo);
|
let biliInfo = await this.constructBiliInfo(videoInfo);
|
||||||
// 总结
|
// 总结
|
||||||
|
if (this.biliDisplaySummary) {
|
||||||
const summary = await this.getBiliSummary(bvid, cid, owner.mid);
|
const summary = await this.getBiliSummary(bvid, cid, owner.mid);
|
||||||
// 封装总结
|
// 封装总结
|
||||||
let Msg = '';
|
summary && e.reply(await Bot.makeForwardMsg(textArrayToMakeForward(e, [`「R插件 x bilibili」联合为您总结内容:`, summary])));
|
||||||
if (!_.isEmpty(summary)) {
|
|
||||||
Msg = await Bot.makeForwardMsg(textArrayToMakeForward(e, [`「R插件 x bilibili」联合为您总结内容:`, summary]));
|
|
||||||
}
|
}
|
||||||
// 限制视频解析
|
// 限制视频解析
|
||||||
if (isLimitDuration) {
|
if (isLimitDuration) {
|
||||||
const durationInMinutes = (curDuration / 60).toFixed(0);
|
const durationInMinutes = (curDuration / 60).toFixed(0);
|
||||||
biliInfo.push(`${ DIVIDING_LINE.replace('{}', '限制说明') }\n当前视频时长约:${ durationInMinutes }分钟,\n大于管理员设置的最大时长 ${ this.biliDuration / 60 } 分钟!`);
|
biliInfo.push(`${ DIVIDING_LINE.replace('{}', '限制说明') }\n当前视频时长约:${ durationInMinutes }分钟,\n大于管理员设置的最大时长 ${ this.biliDuration / 60 } 分钟!`);
|
||||||
Msg && (await e.reply(Msg));
|
|
||||||
e.reply(biliInfo);
|
e.reply(biliInfo);
|
||||||
return true;
|
return true;
|
||||||
} else {
|
} else {
|
||||||
Msg && (await e.reply(Msg));
|
|
||||||
e.reply(biliInfo);
|
e.reply(biliInfo);
|
||||||
}
|
}
|
||||||
// 只提取音乐处理
|
// 只提取音乐处理
|
||||||
|
@ -4,7 +4,7 @@ proxyAddr: '127.0.0.1' # 魔法地址
|
|||||||
proxyPort: '7890' # 魔法端口
|
proxyPort: '7890' # 魔法端口
|
||||||
identifyPrefix: '' # 识别前缀,比如你识别哔哩哔哩,那么就有:✅ 识别:哔哩哔哩
|
identifyPrefix: '' # 识别前缀,比如你识别哔哩哔哩,那么就有:✅ 识别:哔哩哔哩
|
||||||
|
|
||||||
deeplApiUrls: 'https://deeplx.papercar.top/translate,https://deeplx.llleman.com/translate,https://dlx.bitjss.com/translate,https://free-deepl.speedcow.top/translate,https://deeplx.keyrotate.com/translate'
|
deeplApiUrls: 'http://www.gptspt.cn/translate,http://gptspt.top/translate,http://8.134.135.4:1188/translate,http://120.76.141.173:1188/translate,http://bit.x7ys.com:1188/translate,http://deeplxapi.x7ys.com:1188/translate'
|
||||||
|
|
||||||
biliSessData: '' # 哔哩哔哩的SESSDATA
|
biliSessData: '' # 哔哩哔哩的SESSDATA
|
||||||
biliIntroLenLimit: 50 # 哔哩哔哩简介长度限制,填 0 或者 -1 可以不做任何限制,显示完整简介
|
biliIntroLenLimit: 50 # 哔哩哔哩简介长度限制,填 0 或者 -1 可以不做任何限制,显示完整简介
|
||||||
@ -13,6 +13,7 @@ biliDisplayCover: true # 是否显示哔哩哔哩的封面
|
|||||||
biliDisplayInfo: true # 是否显示哔哩哔哩的视频信息
|
biliDisplayInfo: true # 是否显示哔哩哔哩的视频信息
|
||||||
biliDisplayIntro: true # 是否显示哔哩哔哩的简介
|
biliDisplayIntro: true # 是否显示哔哩哔哩的简介
|
||||||
biliDisplayOnline: true # 是否显示哔哩哔哩的在线人数
|
biliDisplayOnline: true # 是否显示哔哩哔哩的在线人数
|
||||||
|
biliDisplaySummary: false # 是否显示哔哩哔哩的总结
|
||||||
biliUseBBDown: false # 是否使用BBDown,默认不开启,开启后使用强劲的BBDown下载最高画质
|
biliUseBBDown: false # 是否使用BBDown,默认不开启,开启后使用强劲的BBDown下载最高画质
|
||||||
biliCDN: 0 # 哔哩哔哩 CDN,默认为0表示不使用
|
biliCDN: 0 # 哔哩哔哩 CDN,默认为0表示不使用
|
||||||
biliDownloadMethod: 0 # 哔哩哔哩的下载方式:0默认使用原生稳定的下载方式,如果你在乎内存可以使用轻量的wget和axel下载方式,如果在乎性能可以使用Aria2下载
|
biliDownloadMethod: 0 # 哔哩哔哩的下载方式:0默认使用原生稳定的下载方式,如果你在乎内存可以使用轻量的wget和axel下载方式,如果在乎性能可以使用Aria2下载
|
||||||
|
@ -156,6 +156,14 @@ export function supportGuoba() {
|
|||||||
component: "Switch",
|
component: "Switch",
|
||||||
required: true,
|
required: true,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
field: "tools.biliDisplaySummary",
|
||||||
|
label: "是否显示总结",
|
||||||
|
bottomHelpMessage:
|
||||||
|
"默认不显示,哔哩哔哩是否显示总结",
|
||||||
|
component: "Switch",
|
||||||
|
required: true,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
field: "tools.biliUseBBDown",
|
field: "tools.biliUseBBDown",
|
||||||
label: "使用BBDown下载",
|
label: "使用BBDown下载",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user