mirror of
https://github.com/Tzahi12345/YoutubeDL-Material.git
synced 2026-03-21 12:10:58 +03:00
Fixed issue where app would not wait for youtube-dl download to finish before proceeding
This commit is contained in:
@@ -657,9 +657,8 @@ describe('youtube-dl', async function() {
|
||||
const downloader_api = require('../downloader');
|
||||
const url = 'https://www.youtube.com/watch?v=hpigjnKl7nI';
|
||||
const args = await downloader_api.generateArgs(url, 'video', {}, null, true);
|
||||
const {child_process, callback} = await youtubedl_api.runYoutubeDL(url, args);
|
||||
const {child_process} = await youtubedl_api.runYoutubeDL(url, args);
|
||||
assert(child_process);
|
||||
console.log(await callback);
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
@@ -101,7 +101,7 @@ exports.checkForYoutubeDLUpdate = async () => {
|
||||
// TODO: don't redownload if fork already exists
|
||||
if (!fs.existsSync(output_file_path) || current_fork !== selected_fork || !current_version || current_version !== latest_version) {
|
||||
logger.warn(`Updating ${selected_fork} binary to '${output_file_path}', downloading...`);
|
||||
exports.updateYoutubeDL(latest_version);
|
||||
await exports.updateYoutubeDL(latest_version);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user