Added file extension check to YT download
This commit is contained in:
parent
d3d7cc9a9c
commit
f4705a0b7f
1 changed files with 1 additions and 1 deletions
|
@ -97,7 +97,7 @@ func getLargestDashFormat(input goutubedl.Result, sizeLimit float64) (videoForma
|
|||
|
||||
func getLargestYTFormat(input goutubedl.Result, sizeLimit float64) (format goutubedl.Format, err error) {
|
||||
for i := len(input.Formats())-1; i >= 0; i-- {
|
||||
if input.Formats()[i].VBR > 0 && input.Formats()[i].ASR > 0 {
|
||||
if input.Formats()[i].VBR > 0 && input.Formats()[i].ASR > 0 && slices.Contains(FileExtensions, input.Formats()[i].Ext) {
|
||||
var size float64
|
||||
if input.Formats()[i].FilesizeApprox > 0 {
|
||||
size = input.Formats()[i].FilesizeApprox
|
||||
|
|
Loading…
Reference in a new issue