From 57c0c15c8294d3e5bc74048edab692862c446e59 Mon Sep 17 00:00:00 2001 From: Logan G Date: Tue, 16 Apr 2024 16:05:01 -0600 Subject: [PATCH] Fixed downloaded videos not having audio --- helpers.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/helpers.go b/helpers.go index 61eedec..64f111a 100644 --- a/helpers.go +++ b/helpers.go @@ -36,7 +36,8 @@ func getLargestFormat(input goutubedl.Result, sizeLimit float64) (format goutube } else { size = input.Formats()[i].Filesize } - if size <= sizeLimit && input.Formats()[i].VCodec != "h265" && slices.Contains(FileExtensions, input.Formats()[i].Ext) { // Discord can't embed HEVC + + if size <= sizeLimit && input.Formats()[i].VCodec != "h265" && input.Formats()[i].ACodec != "none" && slices.Contains(FileExtensions, input.Formats()[i].Ext) { // Discord can't embed HEVC return input.Formats()[i], nil } }