mirror of
https://github.com/Jerryplusy/rc-plugin.git
synced 2025-10-14 16:19:18 +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
|
// 视频:https://www.kuaishou.com/short-video/3xhjgcmir24m4nm
|
||||||
const url = adapter.video;
|
const url = adapter.video;
|
||||||
this.downloadVideo(url).then(path => {
|
this.downloadVideo(url).then(path => {
|
||||||
|
logger.info(path);
|
||||||
this.sendVideoToUpload(e, `${ path }/temp.mp4`)
|
this.sendVideoToUpload(e, `${ path }/temp.mp4`)
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
@ -2125,13 +2126,13 @@ export class tools extends plugin {
|
|||||||
return await this.queue.add(async () => {
|
return await this.queue.add(async () => {
|
||||||
// 如果是用户设置了单线程,则不分片下载
|
// 如果是用户设置了单线程,则不分片下载
|
||||||
if (numThreads === 1) {
|
if (numThreads === 1) {
|
||||||
await this.downloadVideoWithSingleThread(downloadVideoParams);
|
return this.downloadVideoWithSingleThread(downloadVideoParams);
|
||||||
} else if (numThreads !== 1 && this.biliDownloadMethod === 1) {
|
} else if (numThreads !== 1 && this.biliDownloadMethod === 1) {
|
||||||
await this.downloadVideoWithAria2(downloadVideoParams, numThreads);
|
return this.downloadVideoWithAria2(downloadVideoParams, numThreads);
|
||||||
} else if (numThreads !== 1 && this.biliDownloadMethod === 2) {
|
} else if (numThreads !== 1 && this.biliDownloadMethod === 2) {
|
||||||
await this.downloadVideoUseAxel(downloadVideoParams, numThreads);
|
return this.downloadVideoUseAxel(downloadVideoParams, numThreads);
|
||||||
} else {
|
} else {
|
||||||
await this.downloadVideoWithMultiThread(downloadVideoParams, numThreads);
|
return this.downloadVideoWithMultiThread(downloadVideoParams, numThreads);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user