mirror of
https://github.com/Jerryplusy/rc-plugin.git
synced 2025-10-14 08:09:19 +00:00
✨ feat: 新增 视频大小限制(单位MB)
选项
This commit is contained in:
parent
0792cd2451
commit
d589898ffd
@ -199,6 +199,8 @@ export class tools extends plugin {
|
|||||||
this.toolsConfig = config.getConfig("tools");
|
this.toolsConfig = config.getConfig("tools");
|
||||||
// 视频保存路径
|
// 视频保存路径
|
||||||
this.defaultPath = this.toolsConfig.defaultPath;
|
this.defaultPath = this.toolsConfig.defaultPath;
|
||||||
|
// 视频限制大小
|
||||||
|
this.videoSizeLimit = this.toolsConfig.videoSizeLimit;
|
||||||
// 魔法接口
|
// 魔法接口
|
||||||
this.proxyAddr = this.toolsConfig.proxyAddr;
|
this.proxyAddr = this.toolsConfig.proxyAddr;
|
||||||
this.proxyPort = this.toolsConfig.proxyPort;
|
this.proxyPort = this.toolsConfig.proxyPort;
|
||||||
@ -2067,7 +2069,8 @@ export class tools extends plugin {
|
|||||||
* @param path 视频所在路径
|
* @param path 视频所在路径
|
||||||
* @param videoSizeLimit 发送转上传视频的大小限制,默认70MB
|
* @param videoSizeLimit 发送转上传视频的大小限制,默认70MB
|
||||||
*/
|
*/
|
||||||
async sendVideoToUpload(e, path, videoSizeLimit = 70) {
|
async sendVideoToUpload(e, path, videoSizeLimit = this.videoSizeLimit) {
|
||||||
|
// logger.info(videoSizeLimit);
|
||||||
const isLag = await this.isLagRangeDriver();
|
const isLag = await this.isLagRangeDriver();
|
||||||
// 判断是否是拉格朗日
|
// 判断是否是拉格朗日
|
||||||
if (isLag === 1) {
|
if (isLag === 1) {
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
defaultPath: './data/rcmp4/' # 保存视频的位置
|
defaultPath: './data/rcmp4/' # 保存视频的位置
|
||||||
|
videoSizeLimit: 70 # 视频大小限制(单位MB),超过大小则转换成群文件上传
|
||||||
proxyAddr: '127.0.0.1' # 魔法地址
|
proxyAddr: '127.0.0.1' # 魔法地址
|
||||||
proxyPort: '7890' # 魔法端口
|
proxyPort: '7890' # 魔法端口
|
||||||
|
|
||||||
|
@ -77,6 +77,17 @@ export function supportGuoba() {
|
|||||||
placeholder: "请输入视频暂存位置",
|
placeholder: "请输入视频暂存位置",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
field: "tools.videoSizeLimit",
|
||||||
|
label: "视频大小限制",
|
||||||
|
bottomHelpMessage:
|
||||||
|
"视频大小限制(单位MB),超过大小则转换成群文件上传",
|
||||||
|
component: "Input",
|
||||||
|
required: false,
|
||||||
|
componentProps: {
|
||||||
|
placeholder: "请输入视频大小限制",
|
||||||
|
},
|
||||||
|
},
|
||||||
{
|
{
|
||||||
field: "tools.biliSessData",
|
field: "tools.biliSessData",
|
||||||
label: "哔哩哔哩SESSDATA",
|
label: "哔哩哔哩SESSDATA",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user