fix: yt video format

This commit is contained in:
2025-09-19 22:46:29 +03:00
parent 00f0a95d22
commit 4b704cb1f0
3 changed files with 7 additions and 4 deletions

View File

@@ -93,6 +93,8 @@ pub async fn download_ytdlp(url: &str, format: &str) -> Result<DownloadResult> {
"--no-playlist",
"-f",
format,
"--merge-output-format",
"mp4",
"--restrict-filenames",
"-o",
"%(id)s.%(ext)s",

View File

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