Remove --remote-components flags - use bundled yt-dlp-ejs instead

The --remote-components ejs:github flag was causing yt-dlp to attempt
downloading EJS scripts from GitHub. However, Deno runs with --no-remote
flag, blocking all remote access and causing infinite hangs.

Since yt-dlp-ejs is already installed via pip, it will be automatically
detected and used without needing the --remote-components flag.

This fixes the "Getting info" hang issue.

Reference: https://github.com/yt-dlp/yt-dlp/wiki/EJS

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
pull/1160/head
vocoder 4 months ago
parent 8f05c1b113
commit 8a0a621028

@ -546,9 +546,8 @@ exports.generateArgs = async (url, type, options, user_uid = null, simulated = f
// in yt-dlp -j --no-simulate is preferable
downloadConfig.push('--no-clean-info-json', '-j', '--no-simulate');
// Enable external JavaScript support for YouTube (requires Deno + yt-dlp-ejs)
// See: https://github.com/yt-dlp/yt-dlp/wiki/EJS
downloadConfig.push('--remote-components', 'ejs:github');
// Note: yt-dlp-ejs is installed via pip and will be automatically detected
// No --remote-components flag needed (would conflict with Deno's --no-remote flag)
}
}
@ -561,8 +560,6 @@ exports.generateArgs = async (url, type, options, user_uid = null, simulated = f
}
exports.getVideoInfoByURL = async (url, args = [], download_uid = null) => {
const default_downloader = config_api.getConfigItem('ytdl_default_downloader');
// remove bad args
const temp_args = utils.filterArgs(args, ['--no-simulate']);
const new_args = [...temp_args];
@ -574,10 +571,8 @@ exports.getVideoInfoByURL = async (url, args = [], download_uid = null) => {
new_args.push('--dump-json');
// Enable external JavaScript support for YouTube (requires Deno + yt-dlp-ejs)
if (default_downloader === 'yt-dlp') {
new_args.push('--remote-components', 'ejs:github');
}
// Note: yt-dlp-ejs is installed via pip and will be automatically detected
// No --remote-components flag needed (would conflict with Deno's --no-remote flag)
let {callback} = await youtubedl_api.runYoutubeDL(url, new_args);
const {parsed_output, err} = await callback;

@ -52,8 +52,6 @@ exports.subscribe = async (sub, user_uid = null, skip_get_info = false) => {
}
async function getSubscriptionInfo(sub) {
const default_downloader = config_api.getConfigItem('ytdl_default_downloader');
// get videos
let downloadConfig = ['--dump-json', '--playlist-end', '1'];
let useCookies = config_api.getConfigItem('ytdl_use_cookies');
@ -65,10 +63,8 @@ async function getSubscriptionInfo(sub) {
}
}
// Enable external JavaScript support for YouTube (requires Deno + yt-dlp-ejs)
if (default_downloader === 'yt-dlp') {
downloadConfig.push('--remote-components', 'ejs:github');
}
// Note: yt-dlp-ejs is installed via pip and will be automatically detected
// No --remote-components flag needed (would conflict with Deno's --no-remote flag)
let {callback} = await youtubedl_api.runYoutubeDL(sub.url, downloadConfig);
const {parsed_output, err} = await callback;
@ -442,8 +438,8 @@ async function generateArgsForSubscription(sub, user_uid, redownload = false, de
const default_downloader = config_api.getConfigItem('ytdl_default_downloader');
if (default_downloader === 'yt-dlp') {
downloadConfig.push('--no-clean-info-json');
// Enable external JavaScript support for YouTube (requires Deno + yt-dlp-ejs)
downloadConfig.push('--remote-components', 'ejs:github');
// Note: yt-dlp-ejs is installed via pip and will be automatically detected
// No --remote-components flag needed (would conflict with Deno's --no-remote flag)
}
downloadConfig = utils.filterArgs(downloadConfig, ['--write-comments']);

Loading…
Cancel
Save