Pass ytdlOptions for ytdlGetInfo

This commit is contained in:
Umut 2021-10-11 23:42:17 +02:00
parent 94ffd93cde
commit c818bd5e8d

View file

@ -224,7 +224,7 @@ class Player extends EventEmitter<PlayerEvents> {
const qt = options.searchEngine === QueryType.AUTO ? QueryResolver.resolve(query) : options.searchEngine; const qt = options.searchEngine === QueryType.AUTO ? QueryResolver.resolve(query) : options.searchEngine;
switch (qt) { switch (qt) {
case QueryType.YOUTUBE_VIDEO: { case QueryType.YOUTUBE_VIDEO: {
const info = await ytdlGetInfo(query).catch(Util.noop); const info = await ytdlGetInfo(query, this.options.ytdlOptions).catch(Util.noop);
if (!info) return { playlist: null, tracks: [] }; if (!info) return { playlist: null, tracks: [] };
const track = new Track(this, { const track = new Track(this, {