mirror of
https://github.com/kristoferssolo/tg-relay-rs.git
synced 2025-12-20 11:04:41 +00:00
chore: add debug messages
This commit is contained in:
parent
9a6e8bbefc
commit
928aa2fdae
@ -17,7 +17,7 @@ use std::{
|
||||
use teloxide::{Bot, types::ChatId};
|
||||
use tempfile::{TempDir, tempdir};
|
||||
use tokio::{fs::read_dir, process::Command};
|
||||
use tracing::{info, warn};
|
||||
use tracing::{debug, info, warn};
|
||||
|
||||
const FORBIDDEN_EXTENSIONS: &[&str] = &["json", "txt", "log"];
|
||||
|
||||
@ -155,9 +155,6 @@ pub async fn download_youtube(url: impl Into<String>) -> Result<DownloadResult>
|
||||
"--no-playlist",
|
||||
"-t",
|
||||
"mp4",
|
||||
"--restrict-filenames",
|
||||
"-o",
|
||||
"%(title)s.%(ext)s",
|
||||
"--postprocessor-args",
|
||||
&config.youtube.postprocessor_args,
|
||||
]
|
||||
@ -266,6 +263,7 @@ async fn run_yt_dlp(
|
||||
}
|
||||
args.push(url.to_string());
|
||||
|
||||
debug!(args = ?args, "downloadting content");
|
||||
let args_ref = args.iter().map(String::as_ref).collect::<Vec<_>>();
|
||||
run_command_in_tempdir("yt-dlp", &args_ref).await
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user