🎈pref:改为公用下载线程数,便于维护

This commit is contained in:
DESKTOP-I4SRUE6\NikoYoke 2024-10-17 22:06:27 +08:00
parent 599d3e0f30
commit ca3cff652f
3 changed files with 2 additions and 16 deletions

View File

@ -283,8 +283,6 @@ export class tools extends plugin {
this.biliResolution = this.toolsConfig.biliResolution; this.biliResolution = this.toolsConfig.biliResolution;
// 加载youtube的限制时长 // 加载youtube的限制时长
this.youtubeDuration = this.toolsConfig.youtubeDuration this.youtubeDuration = this.toolsConfig.youtubeDuration
// 加载youtube下载最大线程数
this.youtubemaxThreads = this.toolsConfig.youtubemaxThreads
// 加载油管下载画质选项 // 加载油管下载画质选项
this.YouTubeGraphicsOptions = this.toolsConfig.YouTubeGraphicsOptions this.YouTubeGraphicsOptions = this.toolsConfig.YouTubeGraphicsOptions
// 加载抖音Cookie // 加载抖音Cookie
@ -1975,7 +1973,7 @@ export class tools extends plugin {
} else { } else {
e.reply([segment.image(`${ path }/thumbnail.png`),`${ this.identifyPrefix }识别:油管,视频下载中请耐心等待 \n视频标题:${ title }\n视频时长:${(Duration / 60).toFixed(2).replace(/\.00$/, '')} 分钟`]); e.reply([segment.image(`${ path }/thumbnail.png`),`${ this.identifyPrefix }识别:油管,视频下载中请耐心等待 \n视频标题:${ title }\n视频时长:${(Duration / 60).toFixed(2).replace(/\.00$/, '')} 分钟`]);
} }
await ytDlpHelper(path, url, isOversea, this.myProxy, true, graphics, timeRange, this.youtubemaxThreads); await ytDlpHelper(path, url, isOversea, this.myProxy, true, graphics, timeRange, this.videoDownloadConcurrency);
this.sendVideoToUpload(e, `${ path }/temp.mp4`); this.sendVideoToUpload(e, `${ path }/temp.mp4`);
} catch (error) { } catch (error) {
logger.error(error); logger.error(error);

View File

@ -29,7 +29,6 @@ neteaseCloudAudioQuality: exhigh # 网易云解析最高音质 默认exhigh(极
YouTubeGraphicsOptions: 720 # YouTobe的下载画质0为原画1080720480自定义画面高度默认为720 YouTubeGraphicsOptions: 720 # YouTobe的下载画质0为原画1080720480自定义画面高度默认为720
youtubeDuration: 300 # YouTobe限制的最大视频时长默认5分钟单位 youtubeDuration: 300 # YouTobe限制的最大视频时长默认5分钟单位
youtubemaxThreads: 1 # YouTobe下载最大线程数 默认1
douyinCookie: '' # douyin's cookie, 格式odin_tt=xxx;passport_fe_beating_status=xxx;sid_guard=xxx;uid_tt=xxx;uid_tt_ss=xxx;sid_tt=xxx;sessionid=xxx;sessionid_ss=xxx;sid_ucp_v1=xxx;ssid_ucp_v1=xxx;passport_assist_user=xxx;ttwid=xxx; douyinCookie: '' # douyin's cookie, 格式odin_tt=xxx;passport_fe_beating_status=xxx;sid_guard=xxx;uid_tt=xxx;uid_tt_ss=xxx;sid_tt=xxx;sessionid=xxx;sessionid_ss=xxx;sid_ucp_v1=xxx;ssid_ucp_v1=xxx;passport_assist_user=xxx;ttwid=xxx;
douyinCompression: true # true-压缩false-不压缩;是否使用压缩视频格式的抖音(默认使用),使用后加速视频发送 douyinCompression: true # true-压缩false-不压缩;是否使用压缩视频格式的抖音(默认使用),使用后加速视频发送

View File

@ -231,17 +231,6 @@ export function supportGuoba() {
placeholder: "请输入YouTuBe视频最大时长限制默认5分钟", placeholder: "请输入YouTuBe视频最大时长限制默认5分钟",
}, },
}, },
{
field: "tools.youtubemaxThreads",
label: "YouTuBe最大下载线程",
bottomHelpMessage:
"默认为 1,请根据自己的服务器调节,一定程度上缓解切片下载慢的问题",
component: "InputNumber",
required: false,
componentProps: {
placeholder: "请输入YouTuBe最大下载线程",
},
},
{ {
field: "tools.YouTubeGraphicsOptions", field: "tools.YouTubeGraphicsOptions",
label: "YouTube最高分辨率", label: "YouTube最高分辨率",
@ -341,7 +330,7 @@ export function supportGuoba() {
field: "tools.videoDownloadConcurrency", field: "tools.videoDownloadConcurrency",
label: "(高级)下载并发个数", label: "(高级)下载并发个数",
bottomHelpMessage: bottomHelpMessage:
"【涉及哔哩哔哩、抖音】下载并发个数与【允许多用户下载个数】不同这个功能影响下载速度。默认是1表示不使用使用根据服务器性能进行选择如果不确定是否可以用1即可高性能服务器随意4~12都可以看CPU的实力", "【涉及哔哩哔哩、抖音、YouTuBe】下载并发个数与【允许多用户下载个数】不同这个功能影响下载速度。默认是1表示不使用使用根据服务器性能进行选择如果不确定是否可以用1即可高性能服务器随意4~12都可以看CPU的实力",
component: "InputNumber", component: "InputNumber",
required: false, required: false,
componentProps: { componentProps: {