I'm using the version 3.4.2.
While I debug the code after executing this:
const options = {
quality: 'highest',
filter: format => format.hasAudio === false && format.hasVideo == true
};
ytdl.getInfo(url,options)
the formats on utils.js L93 contains values with hasAudio = true. What should I change in the code?
On the version 2 I was using this successfully:
const options = {
quality: 'highest',
filter: 'audioandvideo'
};
Thanks so much
what formats do you get and what do you expect to get?
It was just a check for being sure the filter was working. My final code would beformat.hasAudio === true && format.hasVideo == true. By setting format.hasAudio to false I was expecting that the array of formats would contain ONLY the ones with hasAudio= false, but I am getting all of them. So I wonder if I have a syntax error on the filter.
ytdl.getInfo(xxx) does not filter the formats / support quality and filter parameter
that's a parameter ytdl(xxx) or ytdl.downloadFromInfo(xxx) support
if you want to filter results of ytdl.getInfo(xxx) you can use https://github.com/fent/node-ytdl-core#ytdlchooseformatformats-options which we also use internally
I was following the options typing. I think it should be changed then?
function getInfo(url: string, options?: downloadOptions): Promise
that's the point i'd call it a bug 馃槄
yep, i've already updated the readme to reflect that. need to update typings too.