fix: yt resolution

This commit is contained in:
Kristofers Solo 2025-09-19 22:57:05 +03:00
parent 4b704cb1f0
commit 3cc7fbb541
Signed by: kristoferssolo
GPG Key ID: 8687F2D3EEE6F0ED
2 changed files with 2 additions and 4 deletions

View File

@ -88,11 +88,9 @@ pub async fn download_instaloader(shortcode: &str) -> Result<DownloadResult> {
/// # Errors /// # Errors
/// ///
/// - Propagates `run_command_in_tempdir` errors. /// - Propagates `run_command_in_tempdir` errors.
pub async fn download_ytdlp(url: &str, format: &str) -> Result<DownloadResult> { pub async fn download_ytdlp(url: &str) -> Result<DownloadResult> {
let args = [ let args = [
"--no-playlist", "--no-playlist",
"-f",
format,
"--merge-output-format", "--merge-output-format",
"mp4", "mp4",
"--restrict-filenames", "--restrict-filenames",

View File

@ -44,7 +44,7 @@ impl SocialHandler for YouTubeShortsHandler {
async fn handle(&self, bot: &Bot, chat_id: ChatId, url: String) -> Result<()> { async fn handle(&self, bot: &Bot, chat_id: ChatId, url: String) -> Result<()> {
info!(handler = %self.name(), url = %url, "handling youtube code"); info!(handler = %self.name(), url = %url, "handling youtube code");
let dr = download_ytdlp(&url, "best").await?; let dr = download_ytdlp(&url).await?;
process_download_result(bot, chat_id, dr).await process_download_result(bot, chat_id, dr).await
} }