mirror of
https://github.com/kristoferssolo/tg-relay-rs.git
synced 2025-12-20 11:04:41 +00:00
fix: yt resolution
This commit is contained in:
parent
4b704cb1f0
commit
3cc7fbb541
@ -88,11 +88,9 @@ pub async fn download_instaloader(shortcode: &str) -> Result<DownloadResult> {
|
||||
/// # 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 = [
|
||||
"--no-playlist",
|
||||
"-f",
|
||||
format,
|
||||
"--merge-output-format",
|
||||
"mp4",
|
||||
"--restrict-filenames",
|
||||
|
||||
@ -44,7 +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 dr = download_ytdlp(&url, "best").await?;
|
||||
let dr = download_ytdlp(&url).await?;
|
||||
process_download_result(bot, chat_id, dr).await
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user