mirror of
https://github.com/Jerryplusy/rc-plugin.git
synced 2025-10-14 08:09:19 +00:00
🐞 fix: 修复 p-queue 下载视频问题导致通用解析出错
This commit is contained in:
parent
91e16c5815
commit
7587272dcd
@ -1404,6 +1404,7 @@ export class tools extends plugin {
|
||||
// 视频:https://www.kuaishou.com/short-video/3xhjgcmir24m4nm
|
||||
const url = adapter.video;
|
||||
this.downloadVideo(url).then(path => {
|
||||
logger.info(path);
|
||||
this.sendVideoToUpload(e, `${ path }/temp.mp4`)
|
||||
});
|
||||
} else {
|
||||
@ -2125,13 +2126,13 @@ export class tools extends plugin {
|
||||
return await this.queue.add(async () => {
|
||||
// 如果是用户设置了单线程,则不分片下载
|
||||
if (numThreads === 1) {
|
||||
await this.downloadVideoWithSingleThread(downloadVideoParams);
|
||||
return this.downloadVideoWithSingleThread(downloadVideoParams);
|
||||
} else if (numThreads !== 1 && this.biliDownloadMethod === 1) {
|
||||
await this.downloadVideoWithAria2(downloadVideoParams, numThreads);
|
||||
return this.downloadVideoWithAria2(downloadVideoParams, numThreads);
|
||||
} else if (numThreads !== 1 && this.biliDownloadMethod === 2) {
|
||||
await this.downloadVideoUseAxel(downloadVideoParams, numThreads);
|
||||
return this.downloadVideoUseAxel(downloadVideoParams, numThreads);
|
||||
} else {
|
||||
await this.downloadVideoWithMultiThread(downloadVideoParams, numThreads);
|
||||
return this.downloadVideoWithMultiThread(downloadVideoParams, numThreads);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user