mirror of
https://github.com/Tzahi12345/YoutubeDL-Material.git
synced 2026-04-22 10:33:19 +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_app_details = JSON.parse(fs.readFileSync(current_app_details_path));
|
||||||
let current_version = current_app_details['version'];
|
let current_version = current_app_details['version'];
|
||||||
let stored_binary_path = current_app_details['path'];
|
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
|
// 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';
|
let youtubedl_api_path = 'https://api.github.com/repos/ytdl-org/youtube-dl/tags';
|
||||||
|
|||||||
Reference in New Issue
Block a user