mirror of
https://github.com/Tzahi12345/YoutubeDL-Material.git
synced 2026-04-23 05:03:20 +03:00
Added support for yt-dlp's --no-clean-infojson
This commit is contained in:
@@ -1185,6 +1185,11 @@ async function generateArgs(url, type, options) {
|
|||||||
downloadConfig = downloadConfig.concat(globalArgs.split(',,'));
|
downloadConfig = downloadConfig.concat(globalArgs.split(',,'));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const default_downloader = getCurrentDownloader() || config_api.getConfigItem('ytdl_default_downloader');
|
||||||
|
if (default_downloader === 'yt-dlp') {
|
||||||
|
downloadConfig.push('--no-clean-infojson');
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// filter out incompatible args
|
// filter out incompatible args
|
||||||
@@ -1359,7 +1364,6 @@ async function autoUpdateYoutubeDL() {
|
|||||||
}
|
}
|
||||||
return new Promise(async resolve => {
|
return new Promise(async resolve => {
|
||||||
const default_downloader = config_api.getConfigItem('ytdl_default_downloader');
|
const default_downloader = config_api.getConfigItem('ytdl_default_downloader');
|
||||||
const using_youtube_dlc = default_downloader === 'youtube-dlc';
|
|
||||||
const tags_url = download_sources[default_downloader]['tags_url'];
|
const tags_url = download_sources[default_downloader]['tags_url'];
|
||||||
// get current version
|
// get current version
|
||||||
let current_app_details_path = 'node_modules/youtube-dl/bin/details';
|
let current_app_details_path = 'node_modules/youtube-dl/bin/details';
|
||||||
@@ -1463,6 +1467,12 @@ function updateDetailsJSON(new_version, downloader) {
|
|||||||
fs.writeJSONSync(details_path, details_json);
|
fs.writeJSONSync(details_path, details_json);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function getCurrentDownloader() {
|
||||||
|
const details_path = 'node_modules/youtube-dl/bin/details';
|
||||||
|
const details_json = fs.readJSONSync(details_path);
|
||||||
|
return details_json['downloader'];
|
||||||
|
}
|
||||||
|
|
||||||
async function checkExistsWithTimeout(filePath, timeout) {
|
async function checkExistsWithTimeout(filePath, timeout) {
|
||||||
return new Promise(function (resolve, reject) {
|
return new Promise(function (resolve, reject) {
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user