mirror of
https://github.com/Tzahi12345/YoutubeDL-Material.git
synced 2026-03-27 07:00:55 +03:00
Additional fix for bug that caused server to crash when failing to update youtube-dl
This commit is contained in:
@@ -655,6 +655,11 @@ async function autoUpdateYoutubeDL() {
|
||||
let current_app_details = JSON.parse(fs.readFileSync(current_app_details_path));
|
||||
let current_version = current_app_details['version'];
|
||||
let stored_binary_path = current_app_details['path'];
|
||||
if (!stored_binary_path || typeof stored_binary_path !== 'string') {
|
||||
console.log(`Failed to get youtube-dl binary path at location: ${current_app_details_path}. Cancelling update check.`);
|
||||
resolve(false);
|
||||
return;
|
||||
}
|
||||
|
||||
// got version, now let's check the latest version from the youtube-dl API
|
||||
let youtubedl_api_path = 'https://api.github.com/repos/ytdl-org/youtube-dl/tags';
|
||||
|
||||
Reference in New Issue
Block a user