Fixed downloaded videos not having audio
This commit is contained in:
parent
5699b40313
commit
57c0c15c82
1 changed files with 2 additions and 1 deletions
|
@ -36,7 +36,8 @@ func getLargestFormat(input goutubedl.Result, sizeLimit float64) (format goutube
|
||||||
} else {
|
} else {
|
||||||
size = input.Formats()[i].Filesize
|
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
|
return input.Formats()[i], nil
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue