experimental multidownload implemented

This commit is contained in:
2022-01-27 15:32:31 +01:00
parent 9b0dc4d21b
commit 8c10868dd0
7 changed files with 199 additions and 97 deletions

View File

@@ -7,7 +7,7 @@ const { logger } = require('./logger');
* @constructor
* @param {string} url - The downlaod url.
* @param {string} params - The cli arguments passed by the frontend.
* @param {object} settings - The download settings passed by the frontend.
* @param {*} settings - The download settings passed by the frontend.
*/
class Process {
@@ -26,7 +26,7 @@ class Process {
* @returns {Promise<this>} the process instance
*/
async start(callback) {
await this.__internalGetInfo();
await this.#__internalGetInfo();
const ytldp = spawn('./lib/yt-dlp',
[
@@ -51,7 +51,7 @@ class Process {
* function used internally by the download process to fetch information, usually thumbnail and title
* @returns Promise to the lock
*/
async __internalGetInfo() {
async #__internalGetInfo() {
let lock = true;
let stdoutChunks = [];
const ytdlpInfo = spawn('./lib/yt-dlp', ['-s', '-j', this.url]);