Fixed downloaded videos not having audio

This commit is contained in:
Logan G 2024-04-16 16:05:01 -06:00
parent 5699b40313
commit 57c0c15c82
Signed by: logan
GPG key ID: E328528C921E7A7A

View file

@ -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
}
}