fix: add --remote-components ejs:github to all yt-dlp calls for YouTube 2026 compatibility
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -27,6 +27,8 @@ pub fn check_pot_plugin(cookie_source: &CookieSource) -> bool {
|
|||||||
command
|
command
|
||||||
.arg("-v")
|
.arg("-v")
|
||||||
.arg("--simulate")
|
.arg("--simulate")
|
||||||
|
.arg("--remote-components")
|
||||||
|
.arg("ejs:github")
|
||||||
.args(cookie_source.to_ytdlp_args())
|
.args(cookie_source.to_ytdlp_args())
|
||||||
.arg("https://www.youtube.com/watch?v=dQw4w9WgXcQ");
|
.arg("https://www.youtube.com/watch?v=dQw4w9WgXcQ");
|
||||||
let output = command.output();
|
let output = command.output();
|
||||||
|
|||||||
@@ -25,7 +25,9 @@ pub fn start_download(
|
|||||||
.arg(&output_template)
|
.arg(&output_template)
|
||||||
.arg("--newline")
|
.arg("--newline")
|
||||||
.arg("--no-part")
|
.arg("--no-part")
|
||||||
.arg("-c");
|
.arg("-c")
|
||||||
|
.arg("--remote-components")
|
||||||
|
.arg("ejs:github");
|
||||||
|
|
||||||
for arg in cookie_source.to_ytdlp_args() {
|
for arg in cookie_source.to_ytdlp_args() {
|
||||||
cmd.arg(arg);
|
cmd.arg(arg);
|
||||||
|
|||||||
@@ -19,7 +19,11 @@ pub fn resolve(url: &str, cookie_source: &CookieSource) -> Result<VideoMetadata,
|
|||||||
let cookie_args = cookie_source.to_ytdlp_args();
|
let cookie_args = cookie_source.to_ytdlp_args();
|
||||||
|
|
||||||
let mut meta_cmd = Command::new("yt-dlp");
|
let mut meta_cmd = Command::new("yt-dlp");
|
||||||
meta_cmd.arg("--dump-json").arg("--no-download");
|
meta_cmd
|
||||||
|
.arg("--dump-json")
|
||||||
|
.arg("--no-download")
|
||||||
|
.arg("--remote-components")
|
||||||
|
.arg("ejs:github");
|
||||||
for arg in &cookie_args {
|
for arg in &cookie_args {
|
||||||
meta_cmd.arg(arg);
|
meta_cmd.arg(arg);
|
||||||
}
|
}
|
||||||
@@ -38,7 +42,11 @@ pub fn resolve(url: &str, cookie_source: &CookieSource) -> Result<VideoMetadata,
|
|||||||
let meta = parse_ytdlp_json(&json_str)?;
|
let meta = parse_ytdlp_json(&json_str)?;
|
||||||
|
|
||||||
let mut stream_cmd = Command::new("yt-dlp");
|
let mut stream_cmd = Command::new("yt-dlp");
|
||||||
stream_cmd.arg("-g").arg("--no-download");
|
stream_cmd
|
||||||
|
.arg("-g")
|
||||||
|
.arg("--no-download")
|
||||||
|
.arg("--remote-components")
|
||||||
|
.arg("ejs:github");
|
||||||
for arg in &cookie_args {
|
for arg in &cookie_args {
|
||||||
stream_cmd.arg(arg);
|
stream_cmd.arg(arg);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user